Message Protocol

Messages Between SL Object Scripts and Remote Control Server

Client Protocol (From SL Objects to Server)

Packet Format: #ObjectUUID#Command#Data#challenge#Hash#

Challenge - a random number.

Hash - An MD5 of message up to hash, plus a secret. LSL MD5

Commands:

  • radar - data is a list of Avatars present and position. Max 60.
    Data Format: @UUID@X:Y:Z@{UUID@X:Y:Z@}
  • ....

Server Protocol (From Server to SL Object)

Packet Format: #Command#Data#hash#

Hash - An MD5 of response message up to hash, plus a Challenge.

Commands:

  • ACK - Simple acknowledgement
  • ....

Optimization

The UUID is a LONG value. Rather then sending it everytime, the following angorithm can be used:

  1. Create a largish (1000) array of UUID strings in the LSL script.
  2. Add a new command "newuser" to the Server protocol. Use this to send a new UUDI to the server:
    Packet Format: #ObjectUUID#newuser#UUID#
  3. Everytime a new UUID is seen, it is placed in the UUID array, and the UUID is sent to the server using the newuser packet.
  4. The server also stores the UUID in an array.
  5. The radar command NOW simply includes the index of the UUID in the array, rather then the UUID:
    Example: @UUID@X:Y:Z@{UUID@X:Y:Z@}
  6. To prevent the the table from filling, the server can periodically issue a reset command (in place of a ACK), telling the radar object to clear it's UUID table:
    Packet Format: #resetlist##hash#

-- JimSkon - 2011-06-14

Topic revision: r2 - 2011-06-15 - JimSkon
 
This site is powered by the TWiki collaboration platformCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback