[sldev] [PROTOCOL] Protocol Documentation

John Hurliman jhurliman at wsu.edu
Tue Oct 2 23:59:18 PDT 2007


John Hurliman wrote:
> Community driven documentation is going to be more important then it 
> was previously due to the way the protocol is changing. Traditionally 
> we had everything going over UDP and the format of things was 
> documented by a file called message_template.msg. This allowed clients 
> to either build packets and verify them at runtime (such as the SL 
> viewer) or pre-generate code to represent packets in memory (such as 
> libsecondlife). With the new capabilities system we have no 
> message_template.msg, and there is no way to pre-generate code to 
> represent message structures or verify the correctness of code at 
> runtime. Right now you can't even query what capabilities are 
> available to clients although this may change in the future.

For people following the libsl side of things, I just finished a method 
that uses some C# reflection magic to convert arbitrary LLSD to a Packet 
class, assuming that everything in the LLSD lines up with how it is in 
the message_template.msg file. So far I think this is the case, at least 
for the ones I've tested including the latest AgentGroupDataUpdate. Once 
capability messages with the same names as packets start deviating from 
the template we'll have to throw in custom handlers, but I think this 
should catch a lot of future server upgrades.

The idea about using the OPTIONS method to document CAPS sounds perfect 
though, this would be a great feature in a long term architecture.

John


More information about the SLDev mailing list