|
@@ -9,8 +9,8 @@ Only if step 1.1 is accomplished is and the sessionID of the client was valid or
|
|
Client:
|
|
Client:
|
|
```
|
|
```
|
|
{
|
|
{
|
|
- "version": "versionstring",
|
|
|
|
- "sid": "sessionID"
|
|
|
|
|
|
+ "version": string,
|
|
|
|
+ "sid": string
|
|
}
|
|
}
|
|
```
|
|
```
|
|
Only sends `sid` if client has an old sessionID.
|
|
Only sends `sid` if client has an old sessionID.
|
|
@@ -19,22 +19,22 @@ Only sends `sid` if client has an old sessionID.
|
|
Server:
|
|
Server:
|
|
```
|
|
```
|
|
{
|
|
{
|
|
- "version": "versionstring",
|
|
|
|
|
|
+ "version": string,
|
|
"accept": bool,
|
|
"accept": bool,
|
|
- "sid": "sessionID"
|
|
|
|
|
|
+ "sid": string
|
|
}
|
|
}
|
|
```
|
|
```
|
|
|
|
|
|
If `accept` is `true` the connection is valid. Else the connection will be terminated.
|
|
If `accept` is `true` the connection is valid. Else the connection will be terminated.
|
|
-`sid` must be set if accept is `true` and if the `sid` of the client is invalid. So the server gives a new `sid` if the session is invalid.
|
|
|
|
|
|
+`sid` can be set if accept is `true` and must be set if the `sid` of the client is invalid. So the server gives a new `sid` if the session is invalid. The server can as well use no `sid`. If the server forbids `sid`s but the client is offering one then the connection is to be immediately closed!
|
|
|
|
|
|
### 1.2 Login
|
|
### 1.2 Login
|
|
Client:
|
|
Client:
|
|
```
|
|
```
|
|
{
|
|
{
|
|
- "user": "username",
|
|
|
|
- "pass": "password",
|
|
|
|
- "sid": "sessionID"
|
|
|
|
|
|
+ "user": string,
|
|
|
|
+ "pass": string,
|
|
|
|
+ "sid": string
|
|
}
|
|
}
|
|
```
|
|
```
|
|
|
|
|
|
@@ -66,8 +66,31 @@ Server:
|
|
```
|
|
```
|
|
{
|
|
{
|
|
"command": "status",
|
|
"command": "status",
|
|
- "response": "command response"
|
|
|
|
|
|
+ "response": string
|
|
}
|
|
}
|
|
```
|
|
```
|
|
|
|
|
|
### TODO
|
|
### TODO
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+## 3. Close connection
|
|
|
|
+
|
|
|
|
+### 3.1 Close command
|
|
|
|
+
|
|
|
|
+Client:
|
|
|
|
+```
|
|
|
|
+{
|
|
|
|
+ "command": "close",
|
|
|
|
+ "remembersID": bool
|
|
|
|
+}
|
|
|
|
+```
|
|
|
|
+`remembersID` is optional. If it's `true` then the sID shall be remembered by the server. Else it shall be forgotten.
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+Server:
|
|
|
|
+```
|
|
|
|
+{
|
|
|
|
+ "command": "close",
|
|
|
|
+ "response": "bye"
|
|
|
|
+}
|
|
|
|
+```
|