Tony Caduto wrote:
> Hi,
> I have a chat server is ported from synapse and I used
> twsocketthrdserver so it would scale with 200 sockets per thread. The
> problem is in my original server i used a generic tdictionary to
> store pointers to the client objects. I use a critical section to
> protect the tdictionary and this all works great except when I go
> over 200 connections,  then when a user sends a message to a user in
> the 2nd thread one of them dies,  the 2nd thread does not terminate
> but it's like the message pump dies. 
> I use the protected tdictionary to locate the recipient socket object.
> 
> The thread list and the client list are private and I can't make use
> of them in the stock component.
> 
> Anyone have any ideas on what may be going on?

Access to the protected TDictonary object is thread-safe, however 
it is not calling methods and access properties of the client objects.
You have to communicate with the clients using Window messages.
Look at how TWSocketThrdClient defines a new message ID and overrides
its WndProc method.

BTW: I just checked in some fixes of OverbyteIcsWSocketTS.pas
some 64-bit and one message pump fix.

-- 
Arno   
--
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