client disconnects

I am writing a small trial application to test my networking code. I have stuck with Asynchronous sockets.

When a client connects I add them into a "connection manager" object, which is basically a hashtable of my sockets. Periodically, I get my application to ask my listening object for a list of all the sockets.

In my listening server I have put a timer that calls a function every second to loop through the hashtable and check the connections in the list by sending a small message. On an exception, I just remove the item from the list.

This doesn't seem to me like how i should be approaching the task, but I have put error trapping on every single part of my listening server and don't always seem to detect a disconnect by a client.

Can anybody give any advice on this?

I have looked at so many different examples from various sources, all of them tell me how to setup asynchronous client/servers but none of them seem to deal with handling the connections, and allowing me to display the connected clients in realtime.
[1095 byte] By [hammerstein06] at [2007-11-19 19:41:16]