Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: LivedKrad on October 16, 2005, 07:32 PM

Title: [D2GS] Compressed clumps
Post by: LivedKrad on October 16, 2005, 07:32 PM
Most of the messages that come in upon game join are clumped into one big message. I was wondering: does Battle.net buffer these packets together and then compress them? Or do they compress each packet and then add them to the buffer?
Title: Re: [D2GS] Compressed clumps
Post by: dxoigmn on October 16, 2005, 08:26 PM
You must buffer everything since packets may be fragmented by TCP. Another good question is, do compressed packet clumps always contain full packets? I don't know the answer but to be safe it would be wise to buffer this data as well. I suspect however that compressed packet clumps always contain full packets.
Title: Re: [D2GS] Compressed clumps
Post by: LivedKrad on October 17, 2005, 04:47 PM
You didn't answer my question at all.
Title: Re: [D2GS] Compressed clumps
Post by: Elneroth on October 17, 2005, 05:12 PM
I think he's saying that 'Yes', they buffer all the data before compressing because 'they' would have to, considering 'date is fragmented' in TCP.
^- If so, then yes, he did answer your question.
Title: Re: [D2GS] Compressed clumps
Post by: dxoigmn on October 17, 2005, 05:48 PM
Heh, I sort of misread your question. I'm pretty sure they clump them together and then compress the chunk because of the way huffman works. At least, it would be very wasteful to compress each packet individually and then append them together.
Title: Re: [D2GS] Compressed clumps
Post by: Talora on October 17, 2005, 09:00 PM
Battle.net compresses the file then runs them thru via their buffer.
Title: Re: [D2GS] Compressed clumps
Post by: LivedKrad on November 04, 2005, 03:32 PM
Quote from: Talora on October 17, 2005, 09:00 PM
Battle.net compresses the file then runs them thru via their buffer.

Er?

Quote from: dxoigmn on October 17, 2005, 05:48 PM
Heh, I sort of misread your question. I'm pretty sure they clump them together and then compress the chunk because of the way huffman works. At least, it would be very wasteful to compress each packet individually and then append them together.

Much better. Thanks.
Title: Re: [D2GS] Compressed clumps
Post by: Joe[x86] on November 05, 2005, 09:41 PM
I'm rather sure they would compress each packet first, then join them. That reduces a lot of mess created by the way TCP has a habit of conjoining/splitting packets over the wire.
Title: Re: [D2GS] Compressed clumps
Post by: dxoigmn on November 05, 2005, 10:27 PM
Quote from: Joe on November 05, 2005, 09:41 PM
I'm rather sure they would compress each packet first, then join them. That reduces a lot of mess created by the way TCP has a habit of conjoining/splitting packets over the wire.

Huh? When you receive data over the wire from the d2 game server a length header is sent first, thereby side stepping the issue you described.