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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. WebPage download - limit download speed

WebPage download - limit download speed

Scheduled Pinned Locked Moved C#
csharpperformancequestion
2 Posts 2 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.
  • D Offline
    D Offline
    DUMITRU Guraliuc
    wrote on last edited by
    #1

    Hi, I was wondering if there is a way to limit the bandwidth (kb/sec) when downloading a web page?(C#) If the page is to large, in order not to let the HTTPWebRequest/Response use all bandwidth available, to limit the download to 1kb/sec for instance. Are timers, buffer size and thread(sleep, suspend) a suitable solution for this ?

    N 1 Reply Last reply
    0
    • D DUMITRU Guraliuc

      Hi, I was wondering if there is a way to limit the bandwidth (kb/sec) when downloading a web page?(C#) If the page is to large, in order not to let the HTTPWebRequest/Response use all bandwidth available, to limit the download to 1kb/sec for instance. Are timers, buffer size and thread(sleep, suspend) a suitable solution for this ?

      N Offline
      N Offline
      navvara the infantryman
      wrote on last edited by
      #2

      my 2C are: use a buffer that is filled with new data at regular intervals, this will limit the total bandwith usage by any user but it will not restrict the actual downloada speed, here's some code (pretty schematic): while(!donwloadcompleted) if(GetTime-elapsed>X) {buffer=new data; elapsed=GetTime; //yourdownloadprocedure; } then do the download thingy; hope this helps m$: It is normal for your screen to go blank and for your computer to restart itself several times

      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