C# Socket编程笔记
C# Socket编程笔记
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()