CodePudding user response:
Ready-made no,But to manage connection object, you need to build a thread-safe container
For each client access, keep the relevant information into the container
The container number is the number of members connected client
CodePudding user response:
No, you need to maintain the whole data structure directly, resembling a list structure, dynamic maintenance, you need to connect the connection is successful a node is added to the list, Disconnect Disconnect need to find the node from the list and delete it,