摘要: 阅读全文
posted @ 2010-03-28 19:54 AlexLiu 阅读(716) 评论(0) 推荐(0) 编辑
摘要: BSD Sockets APIintsocket(int family, int type, int protocol);Creates a socket. Currentlyfamilycan only beAF_INET(OT does not support IPv6 so there is no AF_INET6 support).protocolcan bePF_INETorPF_UNS... 阅读全文
posted @ 2010-03-28 12:44 AlexLiu 阅读(4649) 评论(2) 推荐(1) 编辑
摘要: 上文提及,使用BSD socket进行数据发送。由于iPhone的SDK 里面提供的接口是CF Socket。简单DEMO下。一点基础补充:Socket接口是TCP/IP网络的API,Socket接口定义了许多函数或例程,程序员可以用它们来开发TCP/IP网络上的应用程序。要学Internet上的TCP/IP网络编程,必须理解Socket接口。Socket接口设计者最先是将接口放在Unix操作系统... 阅读全文
posted @ 2010-03-28 10:42 AlexLiu 阅读(4923) 评论(2) 推荐(0) 编辑