Add very basic Stream Management (XEP-0198) support

This implementation only counts incomming stanzas and
sends ACKs on request.
While basic this already allows servers to write
messages to offline storage that were sent to,
but never received by a client.
This commit is contained in:
Florian Zeitz 2012-08-10 01:56:55 +02:00 committed by Jonathan Schleifer
parent 882b088fbb
commit 72bc705800
7 changed files with 157 additions and 1 deletions

View file

@ -361,6 +361,11 @@
return supportsRosterVersioning;
}
- (BOOL)supportsStreamManagement
{
return supportsStreamManagement;
}
- (BOOL)checkCertificateAndGetReason: (OFString**)reason
{
X509Certificate *cert;
@ -861,6 +866,10 @@
namespace: XMPP_NS_ROSTERVER] != nil)
supportsRosterVersioning = YES;
if ([element elementForName: @"sm"
namespace: XMPP_NS_SM] != nil)
supportsStreamManagement = YES;
if (mechs != nil) {
OFEnumerator *enumerator;
OFXMLElement *mech;