Add sendStanza to XMPPConnection

This commit is contained in:
Florian Zeitz 2011-02-10 23:46:47 +01:00
parent 3f2a22140e
commit 4bdf81b429
2 changed files with 8 additions and 2 deletions

View file

@ -40,4 +40,5 @@
- (void)connect;
- (void)handleConnection;
- (void)sendStanza: (OFXMLElement*)elem;
@end

View file

@ -79,6 +79,11 @@
}
}
- (void)sendStanza: (OFXMLElement*)elem
{
[sock writeString: [elem stringValue]];
}
- (void)parser: (OFXMLParser*)p
didStartElement: (OFString*)name
withPrefix: (OFString*)prefix
@ -130,7 +135,7 @@
[authTag addChild: [OFXMLElement elementWithCharacters:
[message stringByBase64Encoding]]];
[sock writeString: [authTag stringValue]];
[self sendStanza: authTag];
}
- (void)_sendResourceBind
@ -139,7 +144,7 @@
[iq addChild: [OFXMLElement elementWithName: @"bind"
namespace: NS_BIND]];
[sock writeString: [iq stringValue]];
[self sendStanza: iq];
}
- (void)_handleFeatures: (OFXMLElement*)elem