Author: cazfi Date: Mon Mar 9 20:39:10 2015 New Revision: 28475 URL: http://svn.gna.org/viewcvs/freeciv?rev=28475&view=rev Log: HACKING: Use in initial network protocol example an packet type that is actually used in initial protocol. Document what's the logical difference between initial and main protocol though their content is currently identical.
See patch #5908 Modified: branches/S2_5/doc/HACKING Modified: branches/S2_5/doc/HACKING URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/doc/HACKING?rev=28475&r1=28474&r2=28475&view=diff ============================================================================== --- branches/S2_5/doc/HACKING (original) +++ branches/S2_5/doc/HACKING Mon Mar 9 20:39:10 2015 @@ -178,17 +178,19 @@ A packet is constituted by header followed by the serialized structure data. The header contains the following fields (the sizes are defined in -common/packets.c:packet_header_set()): +common/packets.c:packet_header_set()). Currently this header is +identical to one used in initial handshake protocol, but this can +change in future versions. uint16 : length (the length of the entire packet) uint8 : type (e.g. PACKET_TILE_INFO) For backward compatibility reasons, packets used for the initial protocol -(notably before checking the capabilities) have different header fields +(notably before checking the capabilities) have unchanging header fields sizes (defined in common/packets.c:packet_header_init()): uint16 : length (the length of the entire packet) -uint8 : type (e.g. PACKET_TILE_INFO) +uint8 : type (e.g. PACKET_SERVER_JOIN_REQ) To demonstrate the route for a packet through the system, here's how a unit disband is performed: _______________________________________________ Freeciv-commits mailing list Freecivemail@example.com https://mail.gna.org/listinfo/freeciv-commits