Skip to content

Commit

Permalink
Add networking examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Indy2222 committed Feb 22, 2024
1 parent 603f305 commit ee4f2fb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/src/multiplayer/connector/protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,18 @@ participants. This is indicated by the fourth highest bit of the flags byte

Package payload comprises the user data intended for delivery.

For example the datagram with a semi-reliable package with ID 107907 targeted
to the server carrying payload bytes `0x12 0x34 0x56` would look like this
`0x50 0x01 0xA5 0x83 0x12 0x34 0x56`.

## Protocol Control

Currently, the only type of control datagram is the delivery confirmation
datagram. All bits in the header of these datagrams, except for the first one,
are set to 0. The payload consists of IDs for all user data datagrams that have
been sent reliably and delivered successfully. Each ID is encoded using 3
bytes.

Datagram with confirmation of 3 packages with IDs 1238, 17 and 2443
respectively would look like this `0x80 0x00 0x00 0x00 0x00 0x04 0xD6 0x00 0x00
0x11 0x00 0x09 0x8B`.

0 comments on commit ee4f2fb

Please sign in to comment.