Home > Software engineering >  Is there a function to get the number of sockets and related information on the iocp
Is there a function to get the number of sockets and related information on the iocp

Time:09-16

How to get on the iocp socket number and related information;

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,
  • Related