pod 'SocketRocket'
#import "WebSocketManager.h"//长链接
@property (strong,nonatomic) WebSocketManager *webScoket;//长链接
//长链接
self.webScoket = [WebSocketManager shared];
self.webScoket.delegate =self;
[self.webScoket connectServer];
#pragma mark长链接接收
-(void)webSocketDidReceiveMessage:(NSString *)string{
}
#pragma mark长链接链接成功
-(void)webSocketDidOpen{
}
//设置连接地址在WebSocketManager的connectServer方法中
网友评论