This is the binary frame protocol that the lock server and clients exchange over TCP. Every official client implements this specification identically, byte for byte. See each message's Structure (field layout) and Example (actual bytes sent, changes with refresh) on the pages below.
Byte notation:
opis shown as an ASCII character (e.g.A);wait,lease, andtokenare binary, so they're shown in hex (big-endian) (e.g.wait=5→00 05).keyandaddrare UTF-8 text, andreasonis ASCII text — all of these are variable-length, shown asNin the structure. The trailing\n(newline) terminates the frame as0A. Fields are sent back-to-back with no delimiter.
The server-to-server cluster replication protocol is covered on a separate page.