--- a/PROTOCOL.md Sat Aug 22 16:22:05 2026 +0200 +++ b/PROTOCOL.md Sun Aug 23 11:38:27 2026 +0200 @@ -29,8 +29,8 @@ The datatypes used in the message payloads are as follows: * BYTE — a single byte -* WORD — two bytes integer (big-endian) -* DWORD — four bytes integer (big-endian) +* WORD — two bytes integer (little-endian) +* DWORD — four bytes integer (little-endian) * MOVE — a data structure describing a move, consisting of * a DWORD for the elapsed move time in seconds * a DWORD for additional elapsed move time in microseconds @@ -41,6 +41,10 @@ * a BYTE index for the row the piece was moved to * a BYTE describing the selected piece for promotion (otherwise zero) +Note carefully that the byte order used by this protocol is little-endian while +the standard network byte order would be big-endian. But since the vast majority +of processors use little-endian nowadays, this protocol uses little-endian, too. + The following table shows the possible values for the BYTEs describing a piece. | Piece | Value (Hex) |