Multiplayer protocol: Difference between revisions

Jump to navigation Jump to search
m (Line endings)
Line 1: Line 1:
== The messages ==
All messages are composed of XDR encoded data. (see [http://www.faqs.org/rfcs/rfc1832.html RFC 1832] for a complete description of XDR). XDR basically means: All data is in network byte order and aligned to the nearest multiple of 4 bytes. Strings are encoded as a zero-terminated array of characters,aligned to the nearest multiple of 4 bytes. Floating point numbers (32 or 64 bit) must be encode in the IEEE standard.
== The header ==
== The header ==
All messages contain XDR encoded data and have a well defined header which looks like this:
The header is always 32 bytes long and contains the following fields in exactly that order:


  |'''Magic'''|'''Version'''|'''MsgId'''|'''MsgLen'''|'''ReplyAddress'''|'''ReplyPort'''|'''Callsign'''|'''Data'''|
  |'''Magic'''|'''Version'''|'''MsgId'''|'''MsgLen'''|'''ReplyAddress'''|'''ReplyPort'''|'''Callsign'''|'''Data'''|
17

edits

Navigation menu