> WSocket only with WSocketServer WSocketThrdServer and that this problem
occurs, it takes is 
> a message exchange (string) between client and server with multiple
clients connected 
> simultaneously, the problem with the component WSocket that is working is
that if a 
> customer taking disconnect the network cable, I can not check if there is
a socket opened 
> in ClientThread to destroy it and thereby leaving many threads created
without ...

Is this the same issue as the one related in your previous message ? It
seems not. But this looks closer to the subject.

To close inactive clients, the easiest way is to record the last time a
client sent a request and periodically check the client list and close all
client which had no more activity since a give amount of time.

By the way, why are you using a multithread version ? usually, multithread
applied to simply do not scale very well. Using ICS, properly, you can
usually serve hundreds of client with only a single thread. It is a bad idea
to create a thread for each client, especially if most client are not really

You should create a thread only to execute lengthy requests a client may
send. Any request which execute fast should not have his own thread. And of
course, you should not create and destroy threads but instead a thread pool.

Correctly handling multithreading is frequently difficult for the
unexperimented multithreading developer.

All this being said, I have not enough information to be able to give you
better advice. I can only stay general.

Embarcadero MVP

To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to