340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
|
@throw [SSLInvalidCertificateException
exceptionWithClass: isa
reason: @"No matching identifier"];
}
- (void)sendStanza: (OFXMLElement*)element
{
of_log(@"Out: %@", element);
[sock writeString: [element XMLString]];
}
- (OFString*)generateStanzaID
{
return [OFString stringWithFormat: @"objxmpp_%u", lastID++];
}
|
>
>
>
>
|
|
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
|
@throw [SSLInvalidCertificateException
exceptionWithClass: isa
reason: @"No matching identifier"];
}
- (void)sendStanza: (OFXMLElement*)element
{
if ([delegate respondsToSelector:
@selector(connection:didSendElement:)])
[delegate connection: self
didSendElement: element];
[sock writeString: [element XMLString]];
}
- (OFString*)generateStanzaID
{
return [OFString stringWithFormat: @"objxmpp_%u", lastID++];
}
|
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
|
if ([element name] == nil)
return;
[element setDefaultNamespace: XMPP_NS_CLIENT];
[element setPrefix: @"stream"
forNamespace: XMPP_NS_STREAM];
of_log(@"In: %@", element);
if ([[element namespace] isEqual: XMPP_NS_CLIENT])
[self XMPP_handleStanza: element];
if ([[element namespace] isEqual: XMPP_NS_STREAM])
[self XMPP_handleStream: element];
|
>
>
>
|
|
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
|
if ([element name] == nil)
return;
[element setDefaultNamespace: XMPP_NS_CLIENT];
[element setPrefix: @"stream"
forNamespace: XMPP_NS_STREAM];
if ([delegate respondsToSelector:
@selector(connection:didReceiveElement:)])
[delegate connection: self
didReceiveElement: element];
if ([[element namespace] isEqual: XMPP_NS_CLIENT])
[self XMPP_handleStanza: element];
if ([[element namespace] isEqual: XMPP_NS_STREAM])
[self XMPP_handleStream: element];
|