mirror of
https://github.com/deavminet/dnetd
synced 2024-09-21 09:43:37 +02:00
Updated protocol
This commit is contained in:
parent
8890cd3e79
commit
34fc7212ef
33
protocol.md
33
protocol.md
@ -1,7 +1,34 @@
|
||||
dnet protocol specification
|
||||
===========================
|
||||
|
||||
-- Command listing --
|
||||
## Preamble
|
||||
|
||||
Every command starts with a 1 byte code specifying the command.
|
||||
|
||||
```
|
||||
|-- command (1 byte) --|-- dependant on command (n bytes) --|
|
||||
```
|
||||
|
||||
## Command listing (client/server->server)
|
||||
|
||||
1. `auth` - authenticate a new client
|
||||
2. `link` - authenticate a new server
|
||||
|
||||
## Client/Server types (server->server/client)
|
||||
|
||||
1. `msg` - new message
|
||||
|
||||
## Commands
|
||||
|
||||
### `auth`
|
||||
|
||||
```
|
||||
|-- 0 --|-- username (null-terminated) --|-- password (null-terminated)--|
|
||||
```
|
||||
|
||||
### `link`
|
||||
|
||||
```
|
||||
|-- 0 --|-- todo
|
||||
```
|
||||
|
||||
1. `auth`
|
||||
2. `link`
|
Loading…
Reference in New Issue
Block a user