I took your changes. Thanks.
I also solved an issue when an exception is raised in the worker thread, 
outside of an TWSocket event handler (those exceptions are catched by 
OnBgException). When an exception is raised in the worker thread, it is 
catched, the clients are aborted, a new event OnThreadException is triggered 
and the thread is terminated.

To test this, I added a command to ThrdSrvV3 demo: 'threadexception' which 
trigger an exception in the thread. You can see that it is handled as 
described above.

I also done some more cosmetic changes to the code.

The code is updated on my website. I haven't changed the date nor the 
version info !

Contribute to the SSL Effort. Visit
The author for the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)

----- Original Message ----- 
From: "Arno Garrels" <[EMAIL PROTECTED]>
Sent: Saturday, November 05, 2005 3:41 PM
Subject: Re: [twsocket] Multi threading server component

Arno Garrels wrote:
> Francois PIETTE wrote:
>> The source file is VC32\WSocketTS.pas, VC32\WSocketTS.dcr,
>> Internet\ThrdSrvV3.dpr, Internet\ThrdSrvV3_1.pas,
>> Internet\ThrdSrvV3_1.dfm.
>> It is uploaded as part of "last beta" on my website.

I used RaiseLastOsError at several places, which would compile
on D6 and above only (I wasn't aware that you publish the code at once).
Changed those calls to "raise 

Also added four new events
- OnThreadCreate
- OnBeforeThreadDestroy
- OnClientAttached
- OnClientDetached

Property ClientThread of TWSocketThrdClient 'niled' after call to 

Arno Garrels [TeamICS]

To unsubscribe or change your settings for TWSocket mailing list
please goto
Visit our website at

Reply via email to