summaryrefslogtreecommitdiff
path: root/src/network/core/packet.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-05-01 12:18:34 +0000
committerrubidium <rubidium@openttd.org>2011-05-01 12:18:34 +0000
commit536c581923e456ed6a0d1a47747b7c9e111d8755 (patch)
tree05defe53ea608297aedc8b956372bfbe3579fbd5 /src/network/core/packet.h
parent2e572b98deba13708c3ea5c4c0d417b742e424ae (diff)
downloadopenttd-536c581923e456ed6a0d1a47747b7c9e111d8755.tar.xz
(svn r22401) -Codechange: replace some defines in the udp code so doxygen can create better documentation
Diffstat (limited to 'src/network/core/packet.h')
-rw-r--r--src/network/core/packet.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/network/core/packet.h b/src/network/core/packet.h
index 50a3f5cde..ef9da056a 100644
--- a/src/network/core/packet.h
+++ b/src/network/core/packet.h
@@ -30,6 +30,15 @@ typedef uint8 PacketType; ///< Identifier for the packet
* limit will give an assertion when sending (i.e. writing) the
* packet. Reading past the size of the packet when receiving
* will return all 0 values and "" in case of the string.
+ *
+ * --- Points of attention ---
+ * - all > 1 byte integral values are written in little endian,
+ * unless specified otherwise.
+ * Thus, 0x01234567 would be sent as {0x67, 0x45, 0x23, 0x01}.
+ * - all sent strings are of variable length and terminated by a '\0'.
+ * Thus, the length of the strings is not sent.
+ * - years that are leap years in the 'days since X' to 'date' calculations:
+ * (year % 4 == 0) and ((year % 100 != 0) or (year % 400 == 0))
*/
struct Packet {
/** The next packet. Used for queueing packets before sending. */