• Welcome to Valhalla Legends Archive.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - FooSoft

#1
One more thing actually...

Anyone know offhand if the packet length list on this page still applicable to 1.11b?
http://forum.valhallalegends.com/index.php?topic=11756.75

#2
Ah! All D2GS S > C messages are compressed? Awesome! I was under the impression that some were and some were not. That makes things a lot easier, thanks!
#3
Thanks for the reply, but I'm not sure I follow. Are you saying that a server "message" will always be enclosed in at least one whole packet regardless of whether or not it is compressed or decompressed? I found this not to be the case.

The whole problem is that I don't know how to distinguish between compressed and decompressed messages if multiple messages arrive in one packet. There just appears to be a total lack of context of how to interpret this data.

(messages being logical data D2GS sends out and packets are the TCP segmentation of it)
#4
I'm working on a project that requires me to work with decompressed S > C packets. This means that if a packet is sent from the server decompressed it should be left alone, but if it is sent compressed in compressed format then then it should be decompressed. I have all of the decompression/compression stuff working fine, but I'm not sure how to tell if a packet in a "lump" recv'd from the D2GS is in compressed format or not.

For compressed packets we have
Size: 1-2 bytes (bytes[0] < 0xf0 ? 1 : 2)
PacketId: 1 byte
Data: ? bytes

For decompressed packets it's simply
PacketId: 1 byte
Data ? bytes

So when I receive a packet, is there any way to determine if the first byte is a:
1) First byte of a compressed packet's size
2) PacketId byte of a decompressed packet

I really appreciate any help with this matter   :)