• 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: CFSockets, sockets and timeouts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFSockets, sockets and timeouts


  • Subject: Re: CFSockets, sockets and timeouts
  • From: Nicolas Berloquin <email@hidden>
  • Date: Mon, 12 Apr 2004 13:04:13 +0200

haven't you tried with fcntl to set the O_NONBLOCK flag? that should work.
If you timeout then not all the data will be sent, it can be all as it can be just a small part of it, but you should send all the whole data stream, isn't it ?

I haven't tried with fcntl, but for your question, it's ok if I can't send the whole data at the time of the send, what I do is this:
every 1/10 of a second I go throught all my peers and try to send a pre-defined amount of data.
I send as much as I can from this amount, and I need to know how much that was.
Whatever wasn't sent is kept in another buffer, and this peer is "penalized" for a while : ie I won't try to send as much the next time(s)
around, giving more bandwitdth to the other.
You can view this as a global bandwidth throttling, ie, I know that my whole upload rate will be capped, so I need to know who gets what
so that I can spread the remainder to the others...

my real concern is that I wouldn't send enough data to a send queue that wouldn't be filled, just because of a send timeout set too low.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: CFSockets, sockets and timeouts (corrections)
      • From: Nicolas Berloquin <email@hidden>
References: 
 >Re: CFSockets, sockets and timeouts (From: Dario <email@hidden>)

  • Prev by Date: Re: AFP tuning
  • Next by Date: TCP Spoofer
  • Previous by thread: Re: CFSockets, sockets and timeouts
  • Next by thread: Re: CFSockets, sockets and timeouts (corrections)
  • Index(es):
    • Date
    • Thread