Add -[socket] to XMPPConnection.
This commit is contained in:
parent
673daaf20b
commit
4121a434b7
2 changed files with 11 additions and 0 deletions
|
@ -88,6 +88,7 @@
|
||||||
@property (assign) uint16_t port;
|
@property (assign) uint16_t port;
|
||||||
@property (retain) id <XMPPConnectionDelegate> delegate;
|
@property (retain) id <XMPPConnectionDelegate> delegate;
|
||||||
@property (readonly, retain) XMPPRoster *roster;
|
@property (readonly, retain) XMPPRoster *roster;
|
||||||
|
@property (readonly, retain, getter=socket) OFTCPSocket *sock;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -117,6 +118,11 @@
|
||||||
- (void)parseBuffer: (const char*)buf
|
- (void)parseBuffer: (const char*)buf
|
||||||
withSize: (size_t)size;
|
withSize: (size_t)size;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \return The socket used by the XMPPConnection
|
||||||
|
*/
|
||||||
|
- (OFTCPSocket*)socket;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends an OFXMLElement, usually an XMPPStanza.
|
* Sends an OFXMLElement, usually an XMPPStanza.
|
||||||
*
|
*
|
||||||
|
|
|
@ -240,6 +240,11 @@
|
||||||
withSize: size];
|
withSize: size];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (OFTCPSocket*)socket
|
||||||
|
{
|
||||||
|
return [[sock retain] autorelease];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)sendStanza: (OFXMLElement*)elem
|
- (void)sendStanza: (OFXMLElement*)elem
|
||||||
{
|
{
|
||||||
of_log(@"Out: %@", elem);
|
of_log(@"Out: %@", elem);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue