Protocol version: "0.1"
To start a connection you have to check the versions and verify the login. Only if step 1.1 and 1.2 have been accomplished a usable connection is negotiated.
Client:
{
"version": string
}
Server:
{
"version": string,
"accept": bool
}
If accept
is true
the connection is valid. Else the connection will be terminated after the server answered.
Client:
{
"user": string,
"pass": string
}
Server:
{
"accept": bool
}
If accept
is true
the connection is valid and the user is logged in. Else the connection will be terminated after the server answered.
Commands can be sent by the client after a connection has been negotiated (See 1). Commands can be used unrelated to each other.
Client:
{
"command": "status"
}
Server:
{
"command": "status",
"response": string
}
Client:
{
"command": "close"
}
Server:
{
"command": "close",
"response": "bye"
}