Click here to Skip to main content
15,916,692 members
Home / Discussions / C#
   

C#

 
AnswerRe: Error stop Http Listener Pin
N a v a n e e t h2-Jun-08 22:26
N a v a n e e t h2-Jun-08 22:26 
GeneralRe: Error stop Http Listener Pin
George_George2-Jun-08 22:45
George_George2-Jun-08 22:45 
GeneralRe: Error stop Http Listener Pin
N a v a n e e t h2-Jun-08 22:51
N a v a n e e t h2-Jun-08 22:51 
GeneralRe: Error stop Http Listener Pin
George_George2-Jun-08 23:01
George_George2-Jun-08 23:01 
GeneralRe: Error stop Http Listener Pin
N a v a n e e t h2-Jun-08 23:12
N a v a n e e t h2-Jun-08 23:12 
GeneralRe: Error stop Http Listener Pin
GDavy2-Jun-08 23:08
GDavy2-Jun-08 23:08 
GeneralRe: Error stop Http Listener Pin
N a v a n e e t h2-Jun-08 23:12
N a v a n e e t h2-Jun-08 23:12 
GeneralRe: Error stop Http Listener Pin
GDavy2-Jun-08 23:20
GDavy2-Jun-08 23:20 
GeneralRe: Error stop Http Listener Pin
George_George2-Jun-08 23:42
George_George2-Jun-08 23:42 
GeneralRe: Error stop Http Listener Pin
N a v a n e e t h2-Jun-08 23:56
N a v a n e e t h2-Jun-08 23:56 
GeneralRe: Error stop Http Listener Pin
George_George3-Jun-08 1:24
George_George3-Jun-08 1:24 
GeneralRe: Error stop Http Listener Pin
N a v a n e e t h3-Jun-08 1:40
N a v a n e e t h3-Jun-08 1:40 
GeneralRe: Error stop Http Listener Pin
George_George3-Jun-08 2:16
George_George3-Jun-08 2:16 
GeneralRe: Error stop Http Listener Pin
N a v a n e e t h3-Jun-08 2:30
N a v a n e e t h3-Jun-08 2:30 
GeneralRe: Error stop Http Listener Pin
George_George3-Jun-08 2:49
George_George3-Jun-08 2:49 
GeneralRe: Error stop Http Listener Pin
N a v a n e e t h3-Jun-08 7:03
N a v a n e e t h3-Jun-08 7:03 
GeneralRe: Error stop Http Listener Pin
George_George3-Jun-08 15:23
George_George3-Jun-08 15:23 
GeneralRe: Error stop Http Listener Pin
N a v a n e e t h3-Jun-08 15:33
N a v a n e e t h3-Jun-08 15:33 
GeneralRe: Error stop Http Listener Pin
George_George3-Jun-08 15:49
George_George3-Jun-08 15:49 
GeneralRe: Error stop Http Listener Pin
N a v a n e e t h4-Jun-08 5:16
N a v a n e e t h4-Jun-08 5:16 
GeneralRe: Error stop Http Listener Pin
George_George4-Jun-08 20:34
George_George4-Jun-08 20:34 
GeneralRe: Error stop Http Listener Pin
N a v a n e e t h5-Jun-08 6:55
N a v a n e e t h5-Jun-08 6:55 
George_George wrote:
Do you mean the pattern in my code is not truly handles incoming requests at the same time?


I felt so. Your code won't handle as you are calling WaitOne which will block it. Also the IAsyncResult instance will be overwritten each time. I am not telling that your code can't handle two requests, I am telling it can't handle simultaneous requests because of that blocking.

George_George wrote:
Are there any benefits doing this? Could you show me a couple of lines of pseudo code please?


There are many. You can execute many requests simultaneously. Consider the following pseudo code

1 - Inside the StartListen method, remove call to WaitOne.
2 - Put IAsyncResult inside that loop. Which means IAsyncResult will be created for each request.
3 - Create another class for doing request handling, where you pass this IAsyncresult instance. So ultimately you will have each IAsyncResult instance for each request.

I am not sure about I am correct. But have a try and modify it according to your need.

All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia

How to use google | Ask smart questions

GeneralRe: Error stop Http Listener Pin
George_George5-Jun-08 14:44
George_George5-Jun-08 14:44 
GeneralRe: Error stop Http Listener Pin
N a v a n e e t h5-Jun-08 17:09
N a v a n e e t h5-Jun-08 17:09 
GeneralRe: Error stop Http Listener Pin
George_George5-Jun-08 18:50
George_George5-Jun-08 18:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.