Multiplayer protocol: Difference between revisions

Jump to navigation Jump to search
updated and added xdr information
(Updated table of properties from 3.2.0 source, https://gitorious.org/fg/flightgear/source/cbc8b26df7cae0ea467305463aa0ca9a3db8ebaa:src/MultiPlayer/multiplaymgr.cxx#L68-240)
(updated and added xdr information)
Line 3: Line 3:


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.
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.
FlightGear uses XDR encoded messages that are sent via UDP.
== Resources ==
The routines for handling XDR are contained in $FG_SRC/Multiplayer/tiny_xdr.[h|c]xx:
http://gitorious.org/fg/flightgear/blobs/next/src/MultiPlayer/tiny_xdr.cxx
The different message types supported by the MP protocol are specified in $FG_SRC/MultiPlayer/mpmessages.hxx:
http://gitorious.org/fg/flightgear/blobs/next/src/MultiPlayer/mpmessages.hxx
The multiplayer system code:
https://gitorious.org/fg/flightgear/blobs/next/src/MultiPlayer/multiplaymgr.cxx
eXternal Data Representation (XDR):
http://en.wikipedia.org/wiki/External_Data_Representation


== The header ==
== The header ==
139

edits

Navigation menu