How To Create A Socket Based iPhone App and Server[mark]
以下文章介绍在ios上实现socket客户端。
http://www.raywenderlich.com/3932/how-to-create-a-socket-based-iphone-app-and-server
需要注意的是:
调用[outputStream write:[data bytes] maxLength:[data length]];前先要调用
if ([outputStreamhasSpaceAvailable])