Bandwidth Limiting
Bandwidth Limiting
- Subject: Bandwidth Limiting
- From: Dietrich Epp <email@hidden>
- Date: Fri, 28 Mar 2003 04:20:06 -0800
What is a good way of limiting an applications outgoing (TCP)
bandwidth? My application sends data over multiple TCP connections.
There is a dedicated thread for sending this data, which is queued up
by other parts of the program. I'm completely new to network
programming.
One thought might be to keep track of the amount of data sent over
short amounts of time, and sleep if a limit is reached. But if I have
a T3, for example, and am sending to a pair of T3s and a 2400 baud
modem, how would I portion it out? I know TCP already has Awesome
Congestion-Avoiding Algorithms, but how can my application ration its
resources for this?
Would a TCP socket connected to a host with a modem scream EAGAIN when
I write() to it too fast and it's got O_NONBLOCK set? I guess then I
could do a round-robin over and over with all the connections, but it
seems that this would get smacked down by the scheduler if I don't
actually manage to send anything. Again, I'm completely new to network
programming (and only have limited experience with real-time
applications), so I don't really have a very clear picture of the
Forces at Work.
Thanks in advance.
_______________________________________________
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.