|
@@ -3,15 +3,18 @@
|
|
|
## 1. Start a connection
|
|
|
|
|
|
To start a connection you have to check the versions, generate the sessonID and verify the login.
|
|
|
-Only if step 1.1 and 1.2 have been accomplished a usable connection is negotiated.
|
|
|
+Only if step 1.1 is accomplished is and the sessionID of the client was valid or 1.1 and 1.2 have been accomplished a usable connection is negotiated.
|
|
|
|
|
|
### 1.1 Version check
|
|
|
Client:
|
|
|
```
|
|
|
{
|
|
|
- "version": "versionstring"
|
|
|
+ "version": "versionstring",
|
|
|
+ "sid": "sessionID"
|
|
|
}
|
|
|
```
|
|
|
+Only sends `sid` if client has an old sessionID.
|
|
|
+
|
|
|
|
|
|
Server:
|
|
|
```
|
|
@@ -23,7 +26,7 @@ Server:
|
|
|
```
|
|
|
|
|
|
If `accept` is `true` the connection is valid. Else the connection will be terminated.
|
|
|
-`sid` must be set if accept is `true`.
|
|
|
+`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.
|
|
|
|
|
|
### 1.2 Login
|
|
|
Client:
|