Add sendStanza to XMPPConnection
This commit is contained in:
parent
3f2a22140e
commit
4bdf81b429
2 changed files with 8 additions and 2 deletions
|
@ -40,4 +40,5 @@
|
||||||
|
|
||||||
- (void)connect;
|
- (void)connect;
|
||||||
- (void)handleConnection;
|
- (void)handleConnection;
|
||||||
|
- (void)sendStanza: (OFXMLElement*)elem;
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -79,6 +79,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)sendStanza: (OFXMLElement*)elem
|
||||||
|
{
|
||||||
|
[sock writeString: [elem stringValue]];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)parser: (OFXMLParser*)p
|
- (void)parser: (OFXMLParser*)p
|
||||||
didStartElement: (OFString*)name
|
didStartElement: (OFString*)name
|
||||||
withPrefix: (OFString*)prefix
|
withPrefix: (OFString*)prefix
|
||||||
|
@ -130,7 +135,7 @@
|
||||||
[authTag addChild: [OFXMLElement elementWithCharacters:
|
[authTag addChild: [OFXMLElement elementWithCharacters:
|
||||||
[message stringByBase64Encoding]]];
|
[message stringByBase64Encoding]]];
|
||||||
|
|
||||||
[sock writeString: [authTag stringValue]];
|
[self sendStanza: authTag];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)_sendResourceBind
|
- (void)_sendResourceBind
|
||||||
|
@ -139,7 +144,7 @@
|
||||||
[iq addChild: [OFXMLElement elementWithName: @"bind"
|
[iq addChild: [OFXMLElement elementWithName: @"bind"
|
||||||
namespace: NS_BIND]];
|
namespace: NS_BIND]];
|
||||||
|
|
||||||
[sock writeString: [iq stringValue]];
|
[self sendStanza: iq];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)_handleFeatures: (OFXMLElement*)elem
|
- (void)_handleFeatures: (OFXMLElement*)elem
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue