Long ago I replaced Sockets.pas with BetterSockets.pas. The goal with this new BetterSockets.pas was to primarily overcome shortcomings I encountered while trying to integrate new thread-pooling schemes. I wanted a thread pool that was dynamic. So for example I could set a 10 thread minimum, but still allow the thread count to grow if necessary.
I wasn't able to implement this kind of scheme using OnGetThread, nor by replacing TServerSocketThread (due to the fact that some things were private thatshould have been protected). So now I've got this problem: I can run the listener in TWO different ways (via conditional defines) The first way, listens for a connection, answers the connection, then spawns/chooses a thread for the rest. The second way, listens for a connection, then spawns a thread which answers then processes the connection. A flag is set in the main thread to ensure that the original connection is answered before another thread is chosen/spawned. If I run it the first way, under stress, occasionally threads hang and sit around forever (days). If I run it the second way, under stress, eventually the listener, although listening according to sysinternals' TCPView, stop accepting connections ENTIRELY (very very bad). So currently I'm running it the first way. But really... anyone have a clue for a clueless guy? If you want some source just ask. Jason _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

