Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Jul : Throttling - How does this work?

www.cryer.info
Managed Newsgroup Archive

Throttling - How does this work?

Subject:Throttling - How does this work?
Posted by:"Jamie Dale" (jamie.da..@yahoo.com)
Date:Tue, 24 Jul 2007 23:47:57

Hi

I've been playing with throttling today (Indy v8).

The AThread.Connection's recieve buffer has been set to 1024 bytes.

In the Servers OnWork event, I put a sleep(1000); thinking that this would
make the thread pause for 1 second and then read the next 1024 bytes from
the client.

BUT... The client has sent the entire filestream before the server has even
paused 2 or 3 times.

From my understanding (and looking at v10's throttler source) the receiving
side should basically sleep for the set period, recieve the buffer (thus
empyting it) and then the client should be able to send the next part? -
This isn't happening! My client has sent the entire file within milliseconds
while the server is still reading, sleeping etc to the end of the
filestream.

I've not tried this in reverse yet (IE Server ==> Client) but I'm a bit
concerned that it won't work!
EG If he sending side does not wait for the buffer to be emptied, then how
will my receiving clients control the speed at which they recieve a file? -
Surely on a 56k connection the sender (EG server) would simply choke the
connection? (and vice versa? - Client transmitting to server)


Any advice?

Replies:

www.cryer.info
Managed Newsgroup Archive