C# Socket编程笔记(转)

时间:2022-08-28 02:34:41

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

C# Socket编程笔记(转)

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

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

C# Socket编程笔记(转)