NSString *urlString = @"ip address";
self.webSocket = [[SRWebSocket alloc] initWithURLRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlString]]];
self.webSocket.delegate = self;
[self.webSocket open];
这里didCloseWithCode
被称为是有道理的Stream end encountered
。
关于可能出错的任何想法?