Ping

07/28/2011 22:13 BaussHacker#1
Is there anyways to check users ping serverside? If I'm right ping is getting handled by the client and the ping packet just requires you respond back, but is there a way you can check the ping at the server?
07/28/2011 22:20 _DreadNought_#2
Never tested it myself, BUT it might actually contain the ping.

Breakpoint the data you receive upon the packet being handled, check the values.
07/28/2011 22:24 pro4never#3
Not really... You could try to keep track of the system time on the client's machine but it would be quite ineffective and resource intensive...

Alternatively you could find a packet that the client responds to and send it and time how long it takes to get a reply... but again, there's no simple way to do it.
07/28/2011 22:31 BaussHacker#4
Quote:
Originally Posted by pro4never View Post
Not really... You could try to keep track of the system time on the client's machine but it would be quite ineffective and resource intensive...

Alternatively you could find a packet that the client responds to and send it and time how long it takes to get a reply... but again, there's no simple way to do it.
Yea, that was what I was thinking as well. Not like it's something important, was just wondering.
07/29/2011 01:12 CptSky#5
Quote:
Originally Posted by pro4never View Post
Not really... You could try to keep track of the system time on the client's machine but it would be quite ineffective and resource intensive...

Alternatively you could find a packet that the client responds to and send it and time how long it takes to get a reply... but again, there's no simple way to do it.
MsgTick (1012), it checks for a valid session and if the client doesn't answer correctly or in a valid time range, the client is disconnected. But in general, private servers don't have this packet.

Else, there is an action for MsgAction (1010) that the client need to answer directly. It's like a bot check or I don't know. (Action: 100) The param is the client's timestamp.
07/29/2011 06:00 Spirited#6
I really don't think packet 1012 is necessary. I think it's completely useless. If it's a fake client, they'll just code it in anyways.
07/29/2011 07:00 CptSky#7
Quote:
Originally Posted by Fаng View Post
I really don't think packet 1012 is necessary. I think it's completely useless. If it's a fake client, they'll just code it in anyways.
It can be interesting to flush bad client with too high ping... But yeah, in fact, it's useless for a bot check, but anyway, it's not the first function of the packet. The hash method can be a little verification, nothing more.
01/05/2012 20:55 -impulse-#8
Quote:
Originally Posted by Y u k i View Post
PHP Code:
 bool fSend false;
            try
            {
                if (
fSend Monitor.TryEnter(this50))
                {
                    
this.Socket.Send(Packet);
                }
            }
            
finally 
            
{
                if (!
fSend)
                    
FailedSend();
                else
                    
Monitor.Exit(this);
            } 
thats how ive seen it. Doesnt rly check the ping but on laggy connections it will drop the client.
By doing a search on my current interest, I couldn't help it notice that what you said here is wrong. The function Socket.Send will just buffer your data in the underlying system to be sent and will not also wait until the data is delivered.
01/06/2012 08:46 I don't have a username#9
Quote:
Originally Posted by -impulse- View Post
By doing a search on my current interest, I couldn't help it notice that what you said here is wrong. The function Socket.Send will just buffer your data in the underlying system to be sent and will not also wait until the data is delivered.
The code is from Hybrids Send method lul.
01/06/2012 08:55 Lateralus#10
Packet 1012 is NOT useless; it displays the "warning: network is congested" message for laggy clients. Implement if you're a perfectionist like me.
01/06/2012 08:59 I don't have a username#11
Quote:
Originally Posted by Lateralus View Post
Packet 1012 is NOT useless; it displays the "warning: network is congested" message for laggy clients. Implement if you're a perfectionist like me.
Conquernist. :rolleyes:
01/06/2012 11:50 -impulse-#12
Quote:
Originally Posted by I don't have a username View Post
The code is from Hybrids Send method lul.
That Monitor.TryEnter is for locking purposes. If the server can get a lock for 50 ms on the client's class it will send the packet otherwise it will disconnect the client so no important packet can be lost. Once the lock is gone it's no problem, though it wont take more than 1 ms to use the Send function.
01/06/2012 17:05 I don't have a username#13
Quote:
Originally Posted by -impulse- View Post
That Monitor.TryEnter is for locking purposes. If the server can get a lock for 50 ms on the client's class it will send the packet otherwise it will disconnect the client so no important packet can be lost. Once the lock is gone it's no problem, though it wont take more than 1 ms to use the Send function.
I know already lol.
01/06/2012 17:06 Pαddy#14
Why you pushed old theards?

And he is banned !

Reported
01/06/2012 17:07 I don't have a username#15
Quote:
Originally Posted by நெல் View Post
Why you pushed old theards?

And he is banned !

Reported
I'm not banned on this account umad? And because someone had something related to the topic.