asyncsocket

preview
共3个文件
m:1个
h:1个
ds_store:1个
4星 · 超过85%的资源 需积分: 0 13 下载量 123 浏览量 更新于2014-04-08 收藏 33KB ZIP 举报
/** * In the event of an error, the socket is closed. * You may call "unreadData" during this call-back to get the last bit of data off the socket. * When connecting, this delegate method may be called * before"onSocket:didAcceptNewSocket:" or "onSocket:didConnectToHost:". **/ - (void)onSocket:(AsyncSocket *)sock willDisconnectWithError:(NSError *)err; /** * Called when a socket disconnects with or without error. If you want to release a socket after it disconnects, * do so here. It is not safe to do that during "onSocket:willDisconnectWithError:". * * If you call the disconnect method, and the socket wasn't already disconnected, * this delegate method will be called before the disconnect method returns. **/ - (void)onSocketDidDisconnect:(AsyncSocket *)sock; /** * Called when a socket accepts a connection. Another socket is spawned to handle it. The new socket will have * the same delegate and will call "onSocket:didConnectToHost:port:". **/ - (void)onSocket:(AsyncSocket *)sock didAcceptNewSocket:(AsyncSocket *)newSocket; /** * Called when a new socket is spawned to handle a connection. This method should return the run-loop of the * thread on which the new socket and its delegate should operate. If omitted, [NSRunLoop currentRunLoop] is used. **/ - (NSRunLoop *)onSocket:(AsyncSocket *)sock wantsRunLoopForNewSocket:(AsyncSocket *)newSocket;
身份认证 购VIP最低享 7 折!
30元优惠券