|
You last visited: Today at 18:32
Advertisement
Ping
Discussion on Ping within the CO2 Private Server forum part of the Conquer Online 2 category.
07/28/2011, 22:13
|
#1
|
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
|
Ping
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
|
#2
|
elite*gold: 28
Join Date: Jun 2010
Posts: 2,225
Received Thanks: 868
|
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
|
#3
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
|
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
|
#4
|
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
|
Quote:
Originally Posted by pro4never
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
|
#5
|
elite*gold: 0
Join Date: Jan 2008
Posts: 1,443
Received Thanks: 1,175
|
Quote:
Originally Posted by pro4never
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
|
#6
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,283
Received Thanks: 4,191
|
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
|
#7
|
elite*gold: 0
Join Date: Jan 2008
Posts: 1,443
Received Thanks: 1,175
|
Quote:
Originally Posted by Fаng
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
|
#8
|
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
|
Quote:
Originally Posted by Y u k i
PHP Code:
bool fSend = false;
try
{
if (fSend = Monitor.TryEnter(this, 50))
{
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
|
#9
|
elite*gold: 0
Join Date: Dec 2011
Posts: 1,537
Received Thanks: 785
|
Quote:
Originally Posted by -impulse-
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
|
#10
|
elite*gold: 0
Join Date: May 2005
Posts: 1,892
Received Thanks: 920
|
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
|
#11
|
elite*gold: 0
Join Date: Dec 2011
Posts: 1,537
Received Thanks: 785
|
Quote:
Originally Posted by Lateralus
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.
|
|
|
01/06/2012, 11:50
|
#12
|
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
|
Quote:
Originally Posted by I don't have a username
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
|
#13
|
elite*gold: 0
Join Date: Dec 2011
Posts: 1,537
Received Thanks: 785
|
Quote:
Originally Posted by -impulse-
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
|
#14
|
elite*gold: 15
Join Date: Oct 2011
Posts: 4,388
Received Thanks: 691
|
Why you pushed old theards?
And he is banned !
Reported
|
|
|
01/06/2012, 17:07
|
#15
|
elite*gold: 0
Join Date: Dec 2011
Posts: 1,537
Received Thanks: 785
|
Quote:
Originally Posted by நெல்
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.
|
|
|
Similar Threads
|
0 Ping ?!?!?!
06/24/2011 - CrossFire - 14 Replies
Warum haben alle 0 Ping seit dem patch??
|
[S] COD5 Server ohne Ping beschränkung / möglichst gute Server-Ping
09/24/2010 - General Gaming Discussion - 0 Replies
Hey,
wie der Titel schon sagt, suche ich nen COD5 WaW Server, ohne Lags(egal ob gecrackt oder nicht, will nur zocken)
Es gibt nur zur zeit keine gescheiten Server für COD5 mehr!
Ich komme auch auf manche nicht, weil ich keine lust habe 2,5GB Patches runter zu laden!
Also bitte gebt mir ne Server IP oder nen Namen!
|
All times are GMT +1. The time now is 18:32.
|
|