Network Protocol - Unarelith/OpenMiner GitHub Wiki
NB: This page is a work in progress.
Client commands
ClientConnect
- ID: 0
- Type: TCP
- State: Game
- Sent by: Client
This packet is sent from a client trying to connect to a server.
| Field name | Field type | Notes |
|---|---|---|
| UDP port | u16 |
ClientDisconnect
- ID: 1
- Type: TCP
- State: Game
- Sent by: Client
This packet is sent from a client trying to disconnect from a server.
ClientOk
- ID: 2
- Type: TCP
- State: Game
- Sent by: Server
This packet is sent from a server to tell a client that it has been accepted.
| Field name | Field type | Notes |
|---|---|---|
| Client ID | u16 |
ClientRefused
- ID: 3
- Type: TCP
- State: Game
- Sent by: Server
This packet is sent from a server to tell a client that it has been refused.
Input commands
KeyState
- ID: 4
- Type: UDP
- State: Game
- Sent by: Client
| Field name | Field type | Notes |
|---|---|---|
| Timestamp | u32 | |
| Client ID | u16 | |
| Array | ||
| - Keycode | u32 | |
| - Is key pressed | bool |