# TCPSocket Download Rate

**URL:** <https://www.ruby-forum.com/t/tcpsocket-download-rate/131350>\
**Category:** Ruby\
**Created:** [March 8, 2008, 5:25pm UTC](https://www.ruby-forum.com/t/tcpsocket-download-rate/131350 "2008-03-08T17:25:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![moger777](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@moger777](https://www.ruby-forum.com/u/moger777)\
**Post date:** [March 8, 2008, 5:25pm UTC](https://www.ruby-forum.com/t/tcpsocket-download-rate/131350/1 "2008-03-08T17:25:05Z")

</div>

Hey Everyone,  
Just wondering if there is a way of monitoring the download rate and the  
download progress using TCPSocket. From what I’ve seen once something is  
downloading it pretty much keeps on downloading and I’m not sure how to  
monitor progress.  
thanks,  
Thijs

---

<div class="post-metadata">

**Author:** ![moger777](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@moger777](https://www.ruby-forum.com/u/moger777)\
**Post date:** [March 8, 2008, 6:00pm UTC](https://www.ruby-forum.com/t/tcpsocket-download-rate/131350/2 "2008-03-08T18:00:30Z")

</div>

Thijs De vries wrote:

> Hey Everyone,  
> Just wondering if there is a way of monitoring the download rate and the  
> download progress using TCPSocket. From what I’ve seen once something is  
> downloading it pretty much keeps on downloading and I’m not sure how to  
> monitor progress.  
> thanks,  
> Thijs

Allright, figured it out myself. Turns out if I call  
tcp\_connection.recv(10, 0) multiple times it will get the next 10 bytes,  
followed by the next 10 bytes. Now what I’m wondering is if there is  
anyway I can index where I start downloading so I can download from  
multiple servers that contain the same file?
