On the server side, socket () returns the socket for listening (listen) and accept, which cannot be used to send and receive data between clients.
Accept () accepts a connection request from a client and returns a new socket that differs from the socket () that is returned by the socket () to listen for and accept the connection request from the client, which is done by sending and receiving data on this new socket.
Each incoming client, through the Accept function, returns a different client socket object and a socket that belongs to the client, and the code
Assuming a total of 3 clients connected to the server side, then on the server side of the move has 4 sockets, the 1th is the socket () returned, the socket for listening, and the other 3 are called 3 times respectively accept () the different sockets returned.
If you already have a client connected to the server side and you no longer need to listen and accept more client connections, you can close the socket returned by the socket () without affecting communication with the client.
Understanding of socket accept function by network programming in Python