Skip to content
This repository has been archived by the owner on Aug 28, 2020. It is now read-only.

Signal Byte Header Byte

Malyson Breno edited this page Mar 8, 2020 · 5 revisions

The header byte is a 8 bit signal to treat better the messages your client or server will be receiving.

Header byte table:

Representation Signal Meaning
PING 0 Just one byte signal asking if the connection still alive
SYNC 1 Send and receive a position to keep all clients synchronized
CHAT 2 Every byte after that one is treat as an ASCII text message
INPUT 3 Broadcasts a player input to every connected client **Not implemented yet**
HELLO 4 Signal to Authenticate and create a instance of a connected client
GOODBYE 5 Just a signal sent from a client to disconnect itself from the server
JOIN 6 Signal to broadcast to everybody to create a local instance
HANDSHAKE 7 Response signal for the client know if it was accepted
ALERT 8 Signal to advise custom things. Be creative!
ERROR 255 Tell somebody that it needs to connect to the server first.

This wiki is under construction yet, so somethings may change in the future.

Clone this wiki locally