By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,912 Members | 1,723 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,912 IT Pros & Developers. It's quick & easy.

HttpListener simultaneous connections

P: n/a
Hello everyone,

I need a new web server for our existing website and I don't want
subscribe to the whole IIS way of doing things. I thought I would
implement a custom web server using the new HttpListener interface to
HTTP.SYS.

However, I found after playing with HttpListener that it seems to
completely block all handling of incoming requests from the same IP
address while a response to that IP address is outstanding. For
example, if I do the following:

System.IO.Stream respStream = context.Response.OutputStream;
foreach (byte b in buffer)
{
respStream.WriteByte(b);
Thread.Sleep(500);
}
respStream.Close();

I can see the a, b, c, d, ... characters appear properly in my browser.
However, for as long as this response is outstanding, any other
requests from the same IP address will be queued and not passed to my
application.

I reproduced this result on Windows XP SP2 as well as on Windows 2003
Server.

Does HttpListener have a limit of 1 simultaneous pending request for
each individual client? If so, how can we get rid of this limit? It is
completely unviable for our website to allow only 1 simultaneous
connection at a time. A website visitor needs to be able to have
multiple downloads running at a time, and they need to be able to
browse the website while they are downloading. We need to permit at
least 4 pending responses simultaneously.

Is there any way we can use HttpListener to do this?

Best regards,

denis

Jan 20 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hey - I just found that it works fine with Internet Explorer, whereas
all my previous tests were with Mozilla Firefox!

Could it actually be _Mozilla_ that waits for the first web page to
load completely before even sending a request for the other web
page...? And why would it do that?

Regards!

denis

Jan 20 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.