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()