[sldev] Variable blocks in UDP-Messages

John Hurliman jhurliman at wsu.edu
Sat Aug 4 04:26:18 PDT 2007


slcon wrote:
> HI Guys,
>
> can somebody help me, how variable blocks are transfered in an 
> udp-message? When there is just one single block like it is in the 
> CompletePingCheck -Message, the body of the udp-message starts with 
> the message number and has one U8 variable. After the U8 Field must be 
> the next Message.
> How is it handled when the block is variable like the 
> PacketAck-Message? Is there an extra field, that holds the amount of 
> "Packets"-Blocks?

 From the libsecondlife wiki:

"The message template details how many blocks are in the packet, which 
can be a fixed number or a variable number specified in the packet. 
Fixed is straightforward: there are 1, 2, 4, or more of those blocks in 
order with no separators. Variable blocks are prepended with either one 
or two bytes saying how many there are. If a block is Variable 2 in the 
protocol map it uses two bytes in big endian format, so a count of 7 
would be specified with 0x0700. The same approach is used for the fields."


More information about the SLDev mailing list