"Funke" <ne********@dafunks.comwrote in message
news:ko*******************@bignews1.bellsouth.net. ..
Is there any way to get a list connected sockets that originated from the
listening socket using the listening socket instance?
In .NET, not as far as I know. Typically, an application would maintain its
own list of connected sockets that are related to a specific listening
socket.
I don't think there's even any reliable way to do it outside of .NET either.
The only real connection between the listening socket and sockets connected
by that listening socket is the port number, and since one could close a
listening socket and later open a new one with the same port number, even
enumerating all your open sockets and comparing the port number doesn't
necessarily tell you that those open sockets were connected using a specific
listening socket.
IMHO, the correct thing to do is simply maintain your own list of related
sockets, so that you can perform whatever operations on them are needed as
appropriate.
Pete