CodePudding user response:
From you in several parts of suspicious place you should go to the validationFirst of all, the client should be connected to the server, if there really is connected, it automatically send a message to the server, is sent when the connection is successful, and IP or casual words
Second, the server has a socket set how many clients can be connected at the same time, if there is any change