Arno,

So what you're suggesting is dropping the threads, if I only have event-based 
and non lengthy message handling
in my OnDataAvailable event - thus giving my server app more headroom for 
concurrent sessions ?

On a side note, I have been hammering away on my Server app using a (homemade) 
multithreaded SSL client, and sometimes
I get a ErrCode = 1 in the OnHandShakeDone event.

Do you have any idea as to what might be causing this ?

Is there any way to (re)Start the handshake after the error occurred, without 
closing the connection first ?


Best regards
Kurt



-----Oprindelig meddelelse-----
Fra: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] På vegne 
af Arno Garrels
Sendt: 1. september 2010 11:31
Til: ICS support mailing
Emne: Re: [twsocket] TSslWSocket in a non-blocking multithreaded server

Kurt Andersen wrote:

> I have now implemented a working multithreaded test (server)
> application which uses both the TWSocket and the TSslWSocket in a
> non-blocking manner.

Just a side note to your design "One Thread Per TWSocket Instance",
it's not optimal IMO. TWSocket objects allocate at least one shared,
hidden window per thread which is waste of resources and decreases
the maximum possible number of concurrent client connections. 
TWSocket actually works non-blocking it uses the non-blocking 
winsock API. What is blocking the socket I/O is lengthy tasks 
running in the same thread context.

> I just have to be sure that I understood your reference to
> f_ERR_remove_state(unsigned ThreadID).
> Should I call this function just before the Thread's execute method
> returns, sending the threads ThreadID as param ?

Yes, it is a cleanup function.  

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