hi ive got a small server/client chat program and the server accepts many clients, it all works great, the server having a seperate thread for each socket for each client, but when a client disconnects im kinda stuck. I cant decide what to do with the left over socket because if i just left there taking up space in my socket array wouldnt they eventually build up too much? if i shifted all clients that were above the disconnecting user down one slot that would seem like too much work and cpu resources just for a disconnecting user. thanks for your time.
Hi,
use a List instead of an arrary.
ciao torsten