(Original author: cnzrs)
Under Nonblocking mode;
1. When Serversocket1 gets new connections to users
Serversocket1.socket.activeConnections gets the current connection number serversocket1.socket.connections [i] .socketHandle gets the socket of each connection
Thus, the correspondence between I and SocketHandle in Connections [i] can save this correspondence in the record array.
2. When it is necessary to communicate with the client, determine the client's socketHandle to select Connections [i] to send.
?