[ENet-discuss] How to get the ping?
Ben Johnson
bencelot at gmail.com
Fri Oct 17 23:32:10 PDT 2008
Does anyone know how I would get the actual ping to a peer in Enet?
I know you can get peer->roundTripTime.. but that's not the actual
ping. It's an averaged value over the last x seconds. It also seems to
start at 500 by default.. and because it's averaged, it takes a while
for it to settle down to the actual ping.
Thus.. when players join a game.. for the first 30seconds they warp
all over the place because when I extrapolate by the latency it moves
them forward by ~500ms, when the actual ping is like.. 50ms.
Also, in my server lobby when I want to ping all servers.. I either
have to wait for a few seconds until the ping levels out (seems
pointless), or I get a highly inaccurate ping of ~400 or so.
So surely there must be a way to get the raw, unaveraged ping of a
peer? The very most recent one.
Thanks,
Ben.
More information about the ENet-discuss
mailing list