Title: Message
HI Ehsan.
 
Yes you could but what I want to try and figure out if there is a way to do it without "storing" the sockets at all.  When you accept a connection you get a new "socket" back which I'm then associating with a completion port.
 
When some activity happens on the socket the completion port return the socket and relevant data to use so far I don't have to keep any sort of list about sockets.
 
Now when it comes to shutting the server down I gather the correct way to do so it to close all the sockets.  Stop all the thread running and the close the completion port.  Its at this point that I need the list of sockets. 
 
I was wondering - since the completion port returns the correct socket if there was a way to get it to return all the sockets in some way so I could avoid having to create or use some sort of list?
 
Regards
Max
 
----- Original Message -----
Sent: Tuesday, May 06, 2003 4:43 PM
Subject: RE: [MSVC] IOCP and shutting down

 
HI
 
I'm looking at an IOCP type socket setup.  When I come to shut down the server I'm wondering what is the nest way to do it.  I haven't kept a list of sockets to shut down but the thread gets the right socket when waiting for the GetQueuedCompletionStatus for a normal socket operation.
 
However I wondering how to keep track of all the sockets so I can close then down later.
Can't you just store the SOCKET's in some kind of container?

---------
Ehsan Akhgari

List Owner: [EMAIL PROTECTED]

[Email: [EMAIL PROTECTED]; [EMAIL PROTECTED]]
[WWW: http://www.beginthread.com/Ehsan ]

Reply via email to