1,
- (void)setupStream
{
xmppStream = [[XMPPStream alloc]init];
[xmppStreamaddDelegate:self delegateQueue:dispatch_get_main_queue()];
}
2,xmppstream 的方法,
@property (readwrite, copy) NSString *hostName;
@property (readwrite, assign) UInt16 hostPort;
@property (readwrite, copy) XMPPJID *myJID;
@property (strong, readonly) XMPPJID *remoteJID;
- (BOOL)connectTo:(XMPPJID *)remoteJID withAddress:(NSData *)remoteAddr error:(NSError **)errPtr;
- (BOOL)xmppStream:(XMPPStream *)sender didReceiveIQ:(XMPPIQ *)iq;
- (void)xmppStream:(XMPPStream *)sender didReceiveMessage:(XMPPMessage *)message;
- (void)xmppStream:(XMPPStream *)sender didReceivePresence:(XMPPPresence *)presence;
- (void)sendElement:(NSXMLElement *)element andGetReceipt:(XMPPElementReceipt **)receiptPtr;