//非安全连接
[xmppStream connect:&error]
[xmppStream setHostPort:5222];
allowSelfSignedCertificates = NO;
allowSSLHostNameMismatch = NO;
//安全连接
[xmppStream oldSchoolSecureConnect:&error]
[xmppStream setHostPort:5223];
allowSelfSignedCertificates = YES;
allowSSLHostNameMismatch = YES;
代码界面参考了http://blog.csdn.net/kangkangz4/article/details/7740135
我的代码:
阅读(2515) | 评论(0) | 转发(0) |