• Welcome to Valhalla Legends Archive.
 

D2GS - Dropped due to time out

Started by Elneroth, July 05, 2005, 12:28 AM

Previous topic - Next topic

Elneroth

I've looked all over D2GS documentation, and can't find any information on this.
I was wondering if anyone knows what's wrong.

After sending a message (chat) in a game, about 30 (average) seconds later, I get timed out, and the connection get's reset by the GS. I do not get a timed out if I do not send chat.
*Also, when I have another character in the game I don't see the chat sent by my bot untill a couple seconds before it's timed out.
Also, I can run around without getting dropped out. (Packet 0x03).

Any information will be appreciated.

Thanks,
-Elneroth

*Edit* Also: I am sending 0x06 (Ping) every five seconds.

UserLoser.

You must send a "heartbeat" every 15 seconds or so...

Elneroth

If you mean ping, I'm sending it every five seconds.
Or are you saying I should send it every fifteen seconds instead?

Ringo

#3
D2 sends it every 6 or 7 seconds and it should be sent when recving '06 7A 04 64 BB BC' (compressed) between the logon packets and then be sent every 6 to 7 seconds from then on.
But not sending it untill 5 seconds after joining the game souldnt cause you to drop :(
Do you recv 0x15 packets in responce to walking around before you drop?
Only other thing i can think, is your sending a packet incorrectly.
I would be very carefull how you send packets to the gs, because i was reading a post about a hack list (server logs incorrect packets) :o

[edit]
i just noticed, you said your sending 0x06 as ping packet.
Telling the server your useing your left skill on an invalid object ID is not good.
The correct ping packet is the 2nd packet in this list

Elneroth

I'm sending it Right when I get accepted from the D2GS Login.
And it's being sent every 5 seconds after that.

I don't recall getting 0x15 packets. Also, I do not drop when I'm walking around. It's only when I sent a message.

    .InsertBYTE &H1
    .InsertBYTE &H0
    .InsertNTString Data
    .InsertBYTE &H0
    AddChat vbWhite, VarCName, vbWhite, ": ", QBColor(11), Data
    .SendGame &H15

Here's my send chat

Ringo

#5
Your missing a null byte.


  .InsertBYTE 1
  .InsertBYTE 0
  .InsertNTString data
  .InsertNTString ""
  .InsertNTString ""
  .SendGame &H15

The 2nd string only gets filled with a ingame charname if your trying to @wisper somone (chat type 0x02) and the 3rd string (witch your missing) doesnt get used i dont think.

Elneroth

#6
I had that at first, thought that was the problem :-p, but like 5 minutes later I realized I was sending it to the wrong winsock.

I'll change that back and give it a try.
Thanks for the help.

*Edit*: Yes, it works. Once again, thanks for the help

UserLoser.

#7
IIRC, 0x6c message (heartbeat, or as you say, ping [is this really what's used to calculate ping?]) consists of two dwords.  One is your time value (GetTickCount() or similar), the second one is the amount of milli-seconds your last one was sent.  IIRC once again (sorry it's been probably over a year since I've looked at this, it could have changed), first 0x6c is: GTC & 0x00000000.  Then the next one and all the heartbeats after are: GTC & (GTC - Time last heartbeat was sent).  Hope this makes sense, this post is kind of confusing

LordNevar


        .InsertDWORD GetTickCount
        .InsertDWORD &H0
        .SendGamePacket &H6C


Is what the basic of this packet should look like, it is suggested to send it every 6-7 seconds, but 10 seconds works just fine for me.

Note: This packet should only be sent while your in a game, so just stick it on a timer to be used accordingly.

A good fortune may forbode a bad luck, which may in turn disguise a good fortune.
The greatest trick the Devil ever pulled, was convincing the world he didn't exsist.

Ringo

Quote from: UserLoser on July 05, 2005, 11:19 PM
IIRC, 0x6c message (heartbeat, or as you say, ping [is this really what's used to calculate ping?]) consists of two dwords.  One is your time value (GetTickCount() or similar), the second one is the amount of milli-seconds your last one was sent.  IIRC once again (sorry it's been probably over a year since I've looked at this, it could have changed), first 0x6c is: GTC & 0x00000000.  Then the next one and all the heartbeats after are: GTC & (GTC - Time last heartbeat was sent).  Hope this makes sense, this post is kind of confusing

Hm, i get what you mean, i havent really payed much notice to it, but the last dword does resemble the dword in the 0x53 game refresh packet
I think i remember seeing it sit on a fixed number for about 10 times, but i cant remember.
Do you think the server would check the last dword?
Iv always just used null.

LordNevar

Quote from: Ringo on July 05, 2005, 11:37 PM
Quote from: UserLoser on July 05, 2005, 11:19 PM
IIRC, 0x6c message (heartbeat, or as you say, ping [is this really what's used to calculate ping?]) consists of two dwords.  One is your time value (GetTickCount() or similar), the second one is the amount of milli-seconds your last one was sent.  IIRC once again (sorry it's been probably over a year since I've looked at this, it could have changed), first 0x6c is: GTC & 0x00000000.  Then the next one and all the heartbeats after are: GTC & (GTC - Time last heartbeat was sent).  Hope this makes sense, this post is kind of confusing

Hm, i get what you mean, i havent really payed much notice to it, but the last dword does resemble the dword in the 0x53 game refresh packet
I think i remember seeing it sit on a fixed number for about 10 times, but i cant remember.
Do you think the server would check the last dword?
Iv always just used null.

I've used null as well, I really don't think that it does check it. I've never had a problem with it, I can sit in games for hours without moving just every now and than sending a random message, mostly character speech messages like when you hit the number key and it works just fine.

A good fortune may forbode a bad luck, which may in turn disguise a good fortune.
The greatest trick the Devil ever pulled, was convincing the world he didn't exsist.