网络编程:Socket API简单使用
2017-04-28 本文已影响48人
wuzhiguo
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