Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simulating low bandwidth with TIdHTTP
#4
(12-01-2020, 05:08 PM)Ahmed Sayed Wrote: Sorry. What I meant is that the client still connects to host faster than the simulated speed as it is still on the same machine, while connecting to a remote server takes around a second or two.

You can't control the speed in which a TCP connection is established, as that is handled entirely at the OS layer. The best you could do at the application layer is delay when that connection is attempted, such as by calling Sleep() inside of the OnStatus event during the hsResolving (DNS) and hsConnecting (TCP) states.

Reply


Messages In This Thread
RE: Simulating low bandwidth with TIdHTTP - by rlebeau - 12-01-2020, 05:52 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)