Yes, my web service is already based on a HttpSvr component, not a 
WSocketServer. I looked at the ThrdSvr sample to understand how multithreading 
works with ICS.

The problem is really that my worker threads are not available at the time the 
client socket needs to be attached to one of those, and waiting for a worker 
thread to be available would block the main thread.
In the ThrdSvr sample, there is no such issue because one dedicated thread is 
created for each client socket, but doing so does not match my architecture 
requirements.

I'm trying to manage a second job queue per worker thread to send attachment 
requests that would be processed 'as soon as possible' between two jobs, but it 
seems over-complex for the task, and still introduce a one job delay before the 
main thread can continue...

So my question: is there any way to attach a client connection to another 
thread immediately, from the main thread?

Thanks,
Laurent

 I'm sure you can achieve what you need with thread server, but I've never done
 it, and you are also re-inventing the two existing web servers.

 I would start with OverbyteIcsHttpSrv or OverbyteIcsHttpAppServer depending on
 your needs, and simply call your worker threads from within the client methods,
 filling the answer stream which is returned to the main thread to be returned.


 There is an example of using threads in the FTP server component, where they
 are used while calculating MD5Sums.

 Angus

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