PROTOCOL.CSS
FORMAT / STYLESHEET
01
/*
02
* Nanocord Communication Protocol
03
* --------------------------------
04
* Defines the shared communication between
05
* the Nanocord client and server.
06
*/
07
08
/* Overview: Connections */
09
protocol
10
{
11
communication:
"client ↔ server";
12
authoratitative:
"server";
13
transport:
"TCP";
14
--protocol-version:
2.0;
15
}
16
17
/* Data Model */
18
.packet
19
{
20
pkt_type:
auto;
21
pkt_data:
max-content;
22
}
23
24
.connect_request
25
{
26
pkt_type:
inherit;
27
version:
var(
--protocol-version
);
28
username_length:
fit-content;
29
password_length:
fit-content;
30
data_entry:
content;
31
}
32
33
.connect_response
34
{
35
pkt_type:
inherit;
36
version:
var(
--protocol-version
);
37
err_type:
#C0DE;
38
id:
counter(user);
39
name_length:
fit-content;
40
flags:
none;
41
data_entry:
content;
42
}
43