had
January 14th, 2004, 08:35 AM
When I use I/O completion Socket.
How to get the numbers sockets connect with my server from I/O completion etc?
How to get the numbers sockets connect with my server from I/O completion etc?
|
Click to See Complete Forum and Search --> : About I/O completion Socket. had January 14th, 2004, 08:35 AM When I use I/O completion Socket. How to get the numbers sockets connect with my server from I/O completion etc? Mathew Joy January 16th, 2004, 11:18 PM Could you be more specific, please? What IO completion method do you use? events, completion routine, completion port? Getting the no of connected sockets to your system is to count the no of successful Accept(). had January 17th, 2004, 09:12 PM When I want know how many sockets connect with me, and sockets number list, Just when accpet(), I put it in my buffer and save it? If a socket disconnect, I need delete it. int g_sockets; when accpet() just g_sockets++; disconnect just g_sockets-- struct buffer { SOCKET s; buffer *pPrev; buffer *pNext; } Mathew Joy January 18th, 2004, 11:36 PM Exactly. For every successful accept() you have to increment the value and for every disconnect that is detected (ret value of send/recv == 0) decrement the count. Hope that is what you want. codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |