Winsock programming explain

The creation of a .TCP server and the client program

Server listening socket is created and associated with a local address (specify the IP address and port number) for it,
and then enters a listening state ready to accept client connection requests.
In order to accept the connection request from the client, the server must call accept function.
The client can call after the connect function to create a socket to try to connect to a server listening socket. When the server
after the accept function returns, connect function also returns. At this point the client to use the socket function to create a socket, the service
end use function to create sockets accept, the two sides can communicate up.

 

Guess you like

Origin www.cnblogs.com/liu6666/p/12582877.html
Recommended