2020-09-23 09:37:18 +02:00
|
|
|
dnet protocol specification
|
|
|
|
===========================
|
|
|
|
|
2020-09-23 10:33:19 +02:00
|
|
|
## 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`
|
|
|
|
|
2020-09-23 13:14:55 +02:00
|
|
|
Request format:
|
|
|
|
|
2020-09-23 10:33:19 +02:00
|
|
|
```
|
2020-09-23 10:52:00 +02:00
|
|
|
|-- 0 --|-- usernameLength (1 byte) --|-- username --|-- password --|
|
2020-09-23 10:33:19 +02:00
|
|
|
```
|
|
|
|
|
2020-09-23 13:14:55 +02:00
|
|
|
Reply format:
|
|
|
|
|
|
|
|
```
|
2020-09-24 12:31:53 +02:00
|
|
|
|-- status (1 byte) --|
|
2020-09-23 13:14:55 +02:00
|
|
|
```
|
|
|
|
|
2020-09-23 10:33:19 +02:00
|
|
|
### `link`
|
|
|
|
|
|
|
|
```
|
2020-09-24 12:31:53 +02:00
|
|
|
|-- 1 --|-- todo
|
2020-09-23 10:33:19 +02:00
|
|
|
```
|
2020-09-23 09:37:18 +02:00
|
|
|
|
2020-09-24 12:31:53 +02:00
|
|
|
### `reg`
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
|
### `join`
|
|
|
|
|
|
|
|
Request format:
|
|
|
|
|
|
|
|
TODO: Allow multiple joins
|
|
|
|
|
|
|
|
```
|
|
|
|
|-- 3 --|-- channelToJoin(CSV) --|
|
|
|
|
```
|
|
|
|
|
|
|
|
Reply format:
|
|
|
|
|
|
|
|
```
|
|
|
|
|-- status (1 byte) --|
|
|
|
|
```
|
|
|
|
|
|
|
|
TODO: Support redirects?
|
|
|
|
|
|
|
|
### `part`
|
|
|
|
|
|
|
|
Request format:
|
|
|
|
|
|
|
|
```
|
|
|
|
|-- 4 --|-- channelToPart(CSV) --|
|
|
|
|
```
|
|
|
|
|
|
|
|
Reply format:
|
|
|
|
|
|
|
|
```
|
|
|
|
|-- status (1 byte) --|
|
|
|
|
```
|
|
|
|
|
|
|
|
### `msg`
|
|
|
|
5
|
|
|
|
|
|
|
|
### `list`
|
|
|
|
|
|
|
|
Request format:
|
|
|
|
|
|
|
|
```
|
|
|
|
|-- 6 --|
|
|
|
|
```
|
|
|
|
|
|
|
|
Reply format:
|
|
|
|
|
|
|
|
```
|
|
|
|
|-- status (1 byte) --|-- channelnames(CSV) --|
|
|
|
|
```
|
|
|
|
|
|
|
|
### `chanprop`
|
|
|
|
|