12-02-2020, 12:32 AM
(12-01-2020, 05:52 PM)rlebeau Wrote:(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.
Thanks for the reply, Is there like an equation or formula that to calculate how many milliseconds to sleep on those TCP states to mimic a speed of my selection?

