C# Socket编程笔记(转)

C# Socket编程笔记

http://www.cnblogs.com/stg609/archive/2008/11/15/1333889.html

 

TCP Socket:
Server 端连接步骤:
new socket() -> bind() -> listen() -> accept() ->recv()/send() -> sockets.close()

Client 端连接步骤:
new socket() -> connect -> send()/recv() -> socket.close()

 

 

UDP Socket:
Server 端连接步骤:
new socket() -> bind() -> ReceiveFrom/SendTo() -> socket.close()

Client 端连接步骤:
new socket() -> bind() -> ReceiveFrom/SendTo() -> socket.close()

 

posted @ 2013-08-14 14:53  petercao  阅读(454)  评论(0编辑  收藏  举报