Results 1 to 2 of 2

Thread: Limiting upload speed (winsock)

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2005
    Posts
    1,834

    Limiting upload speed (winsock)

    Hi, I made a small tool to upload files to a server (nntp) with Winsock. More and more users are asking me to build in a feature to limit the upload speed, but I have no idea how this is done. I searched the forums, google and newsgroups, but can't find any information.

    Basically I would like to have a textbox on the form and when the user types '25' into the textbox, then the upload speed is limited to 25 kB/s.

    Does anybody have any information about how to do this?

  2. #2
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: Limiting upload speed (winsock)

    why not start a stopwatch when the upload begins and then every time a packet is sent accumulate the number of bytes sent.

    then divide accum bytes by elapsed seconds.
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width