API
Server
Initialization
socket() -> bind() -> listen()
Loop
accept() -> read() -> write() -> close()
Client
Initialization
socket() -> connect()
Loop
read() -> write() -> close()
socket.png
图片来源:Networking-and-Socket-programming-tutorial-in-C












网友评论