C# Socket编程笔记



C# Socket编程笔记


 

TCP Socket:

Server 端连接步骤:

new socket() -> bind() -> listen() -> accept() ->recv()/send() -> sockets.close()

Client 端连接步骤:

new socket() -> connect -> send()/recv() -> socket.close()

 

C# Socket编程笔记(转)_html

 

UDP Socket:

Server 端连接步骤:

new socket() -> bind() -> ReceiveFrom/SendTo() -> socket.close()

Client 端连接步骤:

new socket() -> bind() -> ReceiveFrom/SendTo() -> socket.close()

 

C# Socket编程笔记(转)_socket编程_02