Capping of sockets
Capping of sockets
- Subject: Capping of sockets
- From: David Aames <email@hidden>
- Date: Fri, 9 Jun 2006 21:57:52 +0100
Hi all,
I've been trying to implement capping of sockets but apparently it
didn't work out quite well. I've tried two things:
1. Before I read() I check the time elapsed before the previous call
to read() and the number of bytes transferred and estimate a speed
based on this. But because the calls happen so frequently (about a
hundred times a sec) that bogged down the system and it didn't work
anyway.
2. Use a timer which checks the current speed every 0.1/0.2 seconds.
This didn't work either because it was using too much CPU.
I should note that I'm using CFSocket and the read()s are performed
every time there is something to read on the socket. Any ideas on how
to go about implement capping?
Thanks
_______________________________________________
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