views:

55

answers:

1
+3  Q: 

Array of Sockets

I had a quick question on how i would maintain a connection of 1000 sockets. Im using threads to initiate writing and reading of the streams.

However when I pass the socket to the new thread, the thread won't exit after excecution. I wanted to know if passing the socket would keep the thread on because it was still connected.

+1  A: 

I wanted to know if passing the socket would keep the thread on because it was still connected.

No. It won't do that.

Your threads are failing to exit for some other reasons. Possibly they are blocked in some operation on their respective sockets. Or maybe they are exiting, but you are expecting the threads or sockets to be magically removed from some array or list. (They won't be.)

I'd need some code, etc to give you a better explanation of what might be happening.

Stephen C