> What you're doing is transfering a socket from main thread
> context to your work thread context.
> My purpose is not the following. What i mean is executing
> all the SQL stuff within the thread,
> and the connection stuff within the main thread.

That's what I do with my MidWare threaded TServerObject. You can apply the same 
logic to the
HttpServer component.

I have a class which manage a pool of threads. When a request comes in, I get a 
thread from the
pool, adding a new one if necessary. The thread receive a reference to the 
socket component , this
is important. The thread execute the lengthy database request and build the 
response message and
pass it to the main thread for sending it back to the client.

When the socket detect a session close, then it nullify the reference the 
thread has so that the
thread know it has to throw away any data or pass it back to the main thread.

--
Contribute to the SSL Effort. Visit
http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be



-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to