• Welcome to Valhalla Legends Archive.
 

16ms Ping (odd for me)

Started by CrAz3D, July 05, 2004, 04:48 PM

Previous topic - Next topic

CrAz3D

I'm thinking this is just a random fluke in my code, but I don't know.

Sometimes, when I try to login with 0ms ping I end up with 16ms instead.  This strikes me as odd since I have dial-up.

Public Sub p0x50()
   Form1.sckBNET.SendData Chr(1)
   InsertDWORD 0
   InsertNonNTString "68XI" & varProduct
   InsertDWORD "&H" & GetVerByte()
   InsertDWORD &H0
   InsertDWORD &H0
   InsertDWORD &H0
   InsertDWORD &H0
   InsertDWORD &H0
   InsertNTString "USA"
   InsertNTString "United States"
   sendPacket &H50
   If frmLogin.chk0Ping.Value = vbChecked Then
       InsertDWORD &H0
       sendPacket &H25
   End If
End Sub



This is recieving 0x25
Case &H25
       If frmLogin.chk1Ping.Value = vbChecked Then
       ElseIf frmLogin.chk0Ping.Value = vbChecked Then
       Else
           InsertNonNTString Mid(data, 5, 4)
           sendPacket &H25
       End If


Any ideas why this happens?
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Soul Taker

Try packet logging it.  If you're sending 0x50 and 0x25 in two seperate clumps, I'm sure it's just your connection being a little slow.

BinaryzL

Yeah that happened to me a couple times.

Eric

Should disable the Nagel Algorithim when connecting and ew at using an object to determine whether or not to spoof the ping.

DeCeP7ioN

This happens to me when using a slow proxy or a slow dial-up connection.

You are sending 0x25 to Battle.net before Battle.net sends it to you to get 0 ms ping time. However, since your connection is so slow, Battle.net actually doesn't get your 0x25 until right after it has sent 0x25 to you.

That is why you are getting 16 ms ping time.
- Deception

iago

Quote from: LoRd[nK] on July 05, 2004, 11:59 PM
Should disable the Nagel Algorithim
Agreed - ping should never be clumped.

Quoteew at using an object to determine whether or not to spoof the ping.
What's wrong with giving the user a checkbox to ask if they want the ping spoofed?


Also, ping time has nothing to do with what type of connection your on.  You can have a dialup connection and a slow ping, as long as nothing else is plugging up the stream.  Ping is based on the time it takes for a tiny bit of data to be transferred, and has more to do with distance.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Lenny

Actually, in order to get the 0ms ping,  you may want to have the Nagel enabled...You need the 0x25 packet to be clumped with 0x50.
If they are sent separately, the chances Battle.net will send 0x25 before it recieves your 0x25 will be greater.
The Bovine Revolution
Something unimportant

Live Battle.net:

WARNING: The preceding message may have contained content unsuitable for young children.

Tuberload

If you handle the clumped packets correctly I don't see why they are a problem.
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

Eric

#8
QuoteQuote:
ew at using an object to determine whether or not to spoof the ping.


What's wrong with giving the user a checkbox to ask if they want the ping spoofed?

Programming 101: Don't use objects in functions because the object names may need to be changed or removed sometime in the future and in which case you'd have to hunt down the functions that contain the object and change them. Checking objects also takes a much longer time to check than a variable.

CrAz3D: A packet log may be helpful.

Arta

#9
Quote from: Lenny on July 06, 2004, 02:56 AM
Actually, in order to get the 0ms ping,  you may want to have the Nagel enabled...You need the 0x25 packet to be clumped with 0x50.
If they are sent separately, the chances Battle.net will send 0x25 before it recieves your 0x25 will be greater.

That's incorrect. Battle.net won't send 0x25 until it receives your initial logon packet (SID_AUTH_INFO or similar). By disabling Nagle, you ensure that your ping packet is sent immediately, and can then wait an appropriate amount of time before proceeding with your logon as normal.

iago

Quote from: LoRd[nK] on July 06, 2004, 03:34 AM
QuoteQuote:
ew at using an object to determine whether or not to spoof the ping.


What's wrong with giving the user a checkbox to ask if they want the ping spoofed?

Programming 101: Don't use objects in functions because the object names may need to be changed or removed sometime in the future and in which case you'd have to hunt down the functions that contain the object and change them. Checking objects also takes a much longer time to check than a variable.

CrAz3D: A packet log may be helpful.

Where do you suggest reading the checkbox?  Passing it as a parameter would be dirty, and saving it in a global variable temporarely would even worse (having a copy of it that you might forget to update, etc.).  
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Banana fanna fo fanna

Lord: VB comes before Programming 101 :)

CrAz3D

It doesn't always happen, that is why there is no packet log.
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Lenny

Quote from: Arta[vL] on July 06, 2004, 03:54 AM
Quote from: Lenny on July 06, 2004, 02:56 AM
Actually, in order to get the 0ms ping,  you may want to have the Nagel enabled...You need the 0x25 packet to be clumped with 0x50.
If they are sent separately, the chances Battle.net will send 0x25 before it recieves your 0x25 will be greater.

That's incorrect. Battle.net won't send 0x25 until it receives your initial logon packet (SID_AUTH_INFO or similar). By disabling Nagle, you ensure that your ping packet is sent immediately, and can then wait an appropriate amount of time before proceeding with your logon as normal.

But won't clumping your 0x25 with your SID_AUTH_INFO ensure it recieves 0x25 immediately after SID_AUTH_INFO...
The Bovine Revolution
Something unimportant

Live Battle.net:

WARNING: The preceding message may have contained content unsuitable for young children.

Blaze

What would happen if you sent 0x25 before 0x50?
Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No