Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Strange Problem

Strange Problem

Scheduled Pinned Locked Moved C#
helpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Moon Boy
    wrote on last edited by
    #1

    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.

    L 1 Reply Last reply
    0
    • M Moon Boy

      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.

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      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

      A 1 Reply Last reply
      0
      • L leppie

        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

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        There 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.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups