• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Capping of sockets
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Capping of sockets


  • Subject: Re: Capping of sockets
  • From: David Aames <email@hidden>
  • Date: Sat, 10 Jun 2006 10:12:27 +0100

Hi all again,

I've been playing with SO_RCVBUF to limit the download and it works. The way I've achieved is really the worst - set SO_RCVBUF to some value(e.g., 1024*15) and sleep(1) so it transfers at 15 KiB/s. The bad thing about this approach is that the sleep call blocks the main loop and pretty much everything else. If I put every socket on a separate thread it would actually kill the performance of the application when I have more than 30-40 connections. So I've read about the TCP window and I *think* what I need to do is control the acknowledgment of the received data i.e., acknowledge as much as I want to limit the download speed. So my question is which function is actually sending the transfer ACK? As Scott Ribe previously stated that calling read() every now and then has no effect I presume it's not read() which ACKs the transfer.

Regards
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Capping of sockets
      • From: "Peter Sichel" <email@hidden>
References: 
 >Re: Capping of sockets (From: Scott Ribe <email@hidden>)
 >Re: Capping of sockets (From: David Aames <email@hidden>)
 >Re: Capping of sockets (From: james woodyatt <email@hidden>)
 >Re: Capping of sockets (From: "David Aames" <email@hidden>)
 >Re: Capping of sockets (From: james woodyatt <email@hidden>)

  • Prev by Date: Re: Capping of sockets
  • Next by Date: Re: Capping of sockets
  • Previous by thread: Re: Capping of sockets
  • Next by thread: Re: Capping of sockets
  • Index(es):
    • Date
    • Thread