Add -[socket] to XMPPConnection.

This commit is contained in:
Jonathan Schleifer 2011-04-01 04:26:54 +02:00
parent 673daaf20b
commit 4121a434b7
2 changed files with 11 additions and 0 deletions

View file

@ -88,6 +88,7 @@
@property (assign) uint16_t port;
@property (retain) id <XMPPConnectionDelegate> delegate;
@property (readonly, retain) XMPPRoster *roster;
@property (readonly, retain, getter=socket) OFTCPSocket *sock;
#endif
/**
@ -117,6 +118,11 @@
- (void)parseBuffer: (const char*)buf
withSize: (size_t)size;
/**
* \return The socket used by the XMPPConnection
*/
- (OFTCPSocket*)socket;
/**
* Sends an OFXMLElement, usually an XMPPStanza.
*

View file

@ -240,6 +240,11 @@
withSize: size];
}
- (OFTCPSocket*)socket
{
return [[sock retain] autorelease];
}
- (void)sendStanza: (OFXMLElement*)elem
{
of_log(@"Out: %@", elem);