Advertisement

Calcuate Ping

Started by June 18, 2004 08:05 PM
2 comments, last by cbenoi1 20 years, 7 months ago
Got one more question ^^ how to calcuate the ping rate in the game plz give an example :)
It's pretty simple; just send a UDP packet to a host that, when it receives that packet, sends back a response. (You could also do ICMP, but it's a little more tricky and not really an improvement). Don't use TCP; various protocol stacks, both in hosts and routers, will buffer and delay individual packets since the protocol is stream-based.
Advertisement
Unless of course, you want to know the TCP route time for some crazy reason ;)
There are several ways to go about it, as Sneftel explained. The usual methods are best explained here:

http://www.codewhore.com/howto1.html

-cb

This topic is closed to new replies.

Advertisement