Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / How do I get Ping value (MultisyncDLL)

Author
Message
Taoie
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 19th Jan 2010 18:51
if I use MultisyncDLL
How do i Get user's Ping value.
Freedom Fighters
14
Years of Service
User Offline
Joined: 2nd Nov 2009
Location:
Posted: 19th Jan 2010 22:29
well. how you think you get it?
it can be simple as the time bewteen each sending and receiving.

so say we have player 1 and player 2. player 1 send a message named PingPlease and player 2 gets that message, then he sends a message back PingReturn and while that messaging is going on you count the time between each send and half it so that show the ping time for it to go from player one to two.

Problem Solution That Never Fails: "Build A Bridge And Get Over It"
Aldur
16
Years of Service
User Offline
Joined: 8th Oct 2007
Location: Melbourne, Australia
Posted: 20th Jan 2010 00:11
What Freedom Fighters said is along the right path, but you can't just half the time it took, as one connection may be faster than the other.

The best way would be to have a timer at the client end, and send the value of that timer to the server. When the server receives the time, it stores it and sends back the time to the client. The client then compares the received time with the sent time for a all round ping.

A lot can be done with timers, and you can measure the ping from client > server and server > client!

Login to post a reply

Server time is: 2024-10-01 23:34:17
Your offset time is: 2024-10-01 23:34:17