Strange Problem
-
Hi, Well, i have 4 Threads, they call the same function to send a File using HttpWebRequest. I need to send the four photos at the same time. The function is called at the same time, but only sends 2 at same time :\ Why?
byte[] buffer = new Byte[256]; int bytesRead = 0; while ( (bytesRead = fileStream.Read(buffer, 0, buffer.Length)) != 0 ) { requestStream.Write(buffer, 0, bytesRead); progress.Value += bytesRead; }
Thanks. -
Hi, Well, i have 4 Threads, they call the same function to send a File using HttpWebRequest. I need to send the four photos at the same time. The function is called at the same time, but only sends 2 at same time :\ Why?
byte[] buffer = new Byte[256]; int bytesRead = 0; while ( (bytesRead = fileStream.Read(buffer, 0, buffer.Length)) != 0 ) { requestStream.Write(buffer, 0, bytesRead); progress.Value += bytesRead; }
Thanks.This is HTTP 1.1 limitations, HTTP 1.0 allows for 4 connections. Im not sure how to get around this, you see the same behaviour in IE. top secret
Download xacc-ide 0.0.3 now!
See some screenshots -
This is HTTP 1.1 limitations, HTTP 1.0 allows for 4 connections. Im not sure how to get around this, you see the same behaviour in IE. top secret
Download xacc-ide 0.0.3 now!
See some screenshotsThere is actually a registry hack for it.
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings] "MaxConnectionsPer1_0Server"=dword:00000019 "MaxConnectionsPerServer"=dword:00000019
That should allow up to 10 simultaneous streams.