in reply to How to pass sockets to different threads?

In addition to the suggestions on how to fix threading problems, you might also take a look at POE. It has the advantage of running in one thread and being easier to program for than threads (you don't have to worry about multiple things happening at the exact same time).

I haven't personally used it on Windows, but I know the core functionality is supposed to work without any issues. I've been using a program on Linux I wrote with POE that handles well over 100 simultaneous connections. It runs for months at a time (basically until we have to reboot the server for something else, like a kernel or hardware upgrade) and I haven't had a single problem with it. (The program is TN3270RG, if you're interested)

  • Comment on Re: How to pass sockets to different threads?