[ENet-discuss] Getting the Ping

Ben Johnson bencelot at gmail.com
Tue Sep 30 00:36:02 PDT 2008


Hello,

I was also wondering the best way to get the ping of a server when scanning
servers.

I found this:

enet_peer_ping(peer);

But I'm apparently getting pings of 400+ over LAN, which shouldn't be.
If I join the game.. I can slowly watch the ping drop down to 20 or so, but
it takes a while. It seems like this is because
peer->lastRoundTripTime is returning an average over the last couple
seconds? I know that it's meant to be the LAST
round trip time.. but why then does it take so long for the ping to settle
down to ~20 over LAN?

Anyway.. if I use enet_peer_ping(peer).. how do I know when the ping has
been returned? Do I have to call
enet_host_service or something? I need to wait for the ping to be ponged
before I can return the function with the updated ping.


Thanks,
Ben.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20080930/bad327a3/attachment.htm>


More information about the ENet-discuss mailing list