I'm just doing a sendline after finding the client object in the
tdictionary, doesn't a send just put the data in the buffer? I even put the
sendline in the critical section and one of the clients still stops
responding after about 10 to 20 messages are sent,  so it does work for
awhile. I will check out the latest code from svn and see what happens.
On Apr 9, 2012 6:22 AM, "Arno Garrels" <arno.garr...@gmx.de> wrote:

> Arno Garrels wrote:
> > 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.
>
> And even that won't be safe. If, for instance, the client has been
> detached from its thread, that is its Handle property is zero, and you call
> PostMessage(Client.Handle..) the handle will be recreated in the context
> of the calling thread, which will likely cause an error when the component
> finally destroys the Handle in main thread context.
>
> Bottomline: Do not use this class if you ever need to access client objects
> from outside their own event handlers. Instead TWSocketServer should be
> used,
> do lengthy, blocking tasks in a worker thread.
>
> --
> 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
>
--
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