Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 09:45

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Feature Analysis] Ping Measurement

Discussion on [Feature Analysis] Ping Measurement within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
[Feature Analysis] Ping Measurement

Hey everyone.
I know how hard it is to code features when you don't have a packet sniffer and such. Not just that, I know that analyzing the packet sniff might be difficult for some who don't know how the data is used. Here's my packet log for sending ping:

Packet Log:
Code:
Packet 1 -- From: TQClient -- Length: 88 | Receive Length: 96 -- Type: 1009
58 00 F1 03 E7 CC 42 00 00 00 00 00 1B 00 00 00 ;   X B        
BE 8F 1F 0D 00 00 00 00 00 00 00 00 00 00 00 00 ;   
            
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;                   
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;                   
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;                   
00 00 00 00 00 00 00 00 54 51 43 6C 69 65 6E 74 ;           TQClient

Packet 2 -- From: TQServer -- Length: 88 | Receive Length: 96 -- Type: 1009
58 00 F1 03 E7 CC 42 00 00 00 00 00 1B 00 00 00 ;   X B        
BE 8F 1F 0D 00 00 00 00 00 00 00 00 00 00 00 00 ;   
            
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;                   
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;                   
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ;                   
00 00 00 00 00 00 00 00 54 51 53 65 72 76 65 72 ;           TQServer
My Analysis:
The client sends an item action packet (1009) to the client every 10 seconds, requesting the ping response from the server (to make a round trip measurement). The response is just sending the packet back. You do not edit the time in the packet. This will result in an invalid reading when the client attempt to display the ping.

Picture:

Spirited is offline  
Thanks
3 Users
Old 07/26/2012, 20:03   #2
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,223
Received Thanks: 867
Interesting read, keep it up.
_DreadNought_ is offline  
Old 07/26/2012, 20:18   #3
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,882
I understand the whisper analysis, but this one had me raise an eye brow asking rusrs??
Every source released has ping implemented, it's not hard to figure out how it works even without a packet logger >__>;
InfamousNoone is offline  
Thanks
3 Users
Old 07/26/2012, 21:25   #4
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
Quote:
Originally Posted by InfamousNoone View Post
I understand the whisper analysis, but this one had me raise an eye brow asking rusrs??
Every source released has ping implemented, it's not hard to figure out how it works even without a packet logger >__>;
I did it because I don't trust the programmers here. They take shortcuts to "make things work". I was curious on whether or not you change the time in it, and nope - you don't. Thought I'd save people the time and thought and post my analysis about it.
Spirited is offline  
Old 07/26/2012, 22:21   #5
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,882
Common sense would tell you that you don't change the time stamp.

Either way the first thing to logically try is echoing it back and then you go O_O IT WORKS and move on with your day.

And for those want the explanation, here's why:

Timestamps are typically signed with timeGetTime() this should be evident, because it's likely this is how you sign your timestamps in your server as this has become the norm in almost ever source. timeGetTime() is a function that is specific to a persons computer, it's not universal, there by meaning there's no way to predict the delta in the timeGetTime() of your computer, and someone elses (easily). Even if you didn't know this, one would usually assume a time-related value is specific to the computer doing the invoking.

So, we know the client sends the ping packet with a time stamp, and we know we have to send it back. Why would we alter the time stamp? The easiest way of calculating ping is simply signing a value (hence the ts) and finding out how long the trip takes by the server echoing it back, which is simply delta-time. By changing the value, delta time will give a "weird" value.

And lastly,
The client does not send it every 10s, it sends it ever 10s + the time to render a single frame; as well you should not make the assumption the server will receive it every 10s due to network latency.
InfamousNoone is offline  
Thanks
4 Users
Old 07/26/2012, 23:09   #6
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
Quote:
Originally Posted by InfamousNoone View Post
Common sense would tell you that you don't change the time stamp.

Either way the first thing to logically try is echoing it back and then you go O_O IT WORKS and move on with your day.

And for those want the explanation, here's why:

Timestamps are typically signed with timeGetTime() this should be evident, because it's likely this is how you sign your timestamps in your server as this has become the norm in almost ever source. timeGetTime() is a function that is specific to a persons computer, it's not universal, there by meaning there's no way to predict the delta in the timeGetTime() of your computer, and someone elses (easily). Even if you didn't know this, one would usually assume a time-related value is specific to the computer doing the invoking.

So, we know the client sends the ping packet with a time stamp, and we know we have to send it back. Why would we alter the time stamp? The easiest way of calculating ping is simply signing a value (hence the ts) and finding out how long the trip takes by the server echoing it back, which is simply delta-time. By changing the value, delta time will give a "weird" value.

And lastly,
The client does not send it every 10s, it sends it ever 10s + the time to render a single frame; as well you should not make the assumption the server will receive it every 10s due to network latency.
The server assigns the time does it not, using packet 1033? I thought that's why TQ introduced it (so the server and client times matched up to do checks like that). Anyways, you're right. A round trip makes more sense. I was just curious.

EDIT: you're right
time zones do matter
i shouldn't assume that tq knows how to properly code a server and client.
Spirited is offline  
Old 07/26/2012, 23:47   #7
 
elite*gold: 0
Join Date: Aug 2011
Posts: 31
Received Thanks: 1
Good work bu can u give me a link for a logger and sniffer plz
hazemz is offline  
Old 07/26/2012, 23:49   #8
 
diedwarrior's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 611
Received Thanks: 195
Quote:
Originally Posted by hazemz View Post
Good work bu can u give me a link for a logger and sniffer plz
diedwarrior is offline  
Old 07/28/2012, 05:17   #9


 
CptSky's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 1,434
Received Thanks: 1,147
Quote:
Originally Posted by Fаng View Post
The server assigns the time does it not, using packet 1033? I thought that's why TQ introduced it (so the server and client times matched up to do checks like that). Anyways, you're right. A round trip makes more sense. I was just curious.

EDIT: you're right
time zones do matter
i shouldn't assume that tq knows how to properly code a server and client.
timeGetTime() is part of the WinAPI and can't be set. The only thing set by the packet 1033 is the date in the client. Not the timestamps.
CptSky is offline  
Thanks
2 Users
Reply


Similar Threads Similar Threads
[Feature Analysis] Whisper Details
07/03/2013 - CO2 Private Server - 16 Replies
Hey everyone. I know how hard it is to code features when you don't have a packet sniffer and such. Not just that, I know that analyzing the packet sniff might be difficult for some who don't know how the data is used. Here's my packet log for whisper details: Packet Log: Packet 1 -- From: TQClient -- Length: 25 | Receive Length: 33 -- Type: 1015 19 00 F7 03 00 00 00 00 1A 01 0C 53 6D 6F 6B 65 ; Smoke 54 68 65 42 6F 6D 62 00 00 54 51 43 6C 69 65 6E ; TheBomb TQClien 74 ...
Analysis
01/18/2012 - Dekaron Private Server - 10 Replies
For everyone asking.... ALL the time This is my analysis of the current pservers out there. http://i.imgur.com/SN4IT.png http://www.elitepvpers.com/forum/imgur.com/lplYa. png
Ping Muito Alto[Very High Ping]
11/03/2011 - Perfect World - 1 Replies
Portugues: Gente o Meu PWBR Esta Com o Ping Muito Alto e Muita Lag Como Diminuo Isso English: My PWBR People With This Very High Ping Lag and How Much diminish that
Ego Hunger Measurement
06/07/2010 - Mabinogi - 30 Replies
Just wondering if there is a way to display exact ego hunger levels



All times are GMT +2. The time now is 09:45.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.