2012-01-27, 08:35 PM
For the nDroidService I have a thread which uses the HttpListener class in synchronous mode. I create the listener instance and then use......which blocks the thread until a request comes in. I then process the request and respond within the same thread and loop back to that line to listen/block again.
I want to expand the code to just simply take a request and put it out to a different thread to handle in its own time rather than process in a synchronous manner. I've looked at the BeginGetContext method of HttpListener but I can't get my head around how to use it and I'm not sure it's what I want anyway.
Anybody have any ideas for handling multiple HTTP connections/requests/responses simultaneously?
Code:
listener.GetContext();
I want to expand the code to just simply take a request and put it out to a different thread to handle in its own time rather than process in a synchronous manner. I've looked at the BeginGetContext method of HttpListener but I can't get my head around how to use it and I'm not sure it's what I want anyway.
Anybody have any ideas for handling multiple HTTP connections/requests/responses simultaneously?