asyncsocket

时间:2017-04-28 04:18:20
【文件属性】:

文件名称:asyncsocket

文件大小:33KB

文件格式:ZIP

更新时间:2017-04-28 04:18:20

asyncsocket

/** * 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;


【文件预览】:
asyncsocket
----.DS_Store(6KB)
----AsyncSocket.m(126KB)
----AsyncSocket.h(30KB)

网友评论

  • 感觉好强大的样子,正好能用到