瀏覽代碼

Skip login with sessionID

anon 5 年之前
父節點
當前提交
ce0c25933f
共有 1 個文件被更改,包括 6 次插入3 次删除
  1. 6 3
      Client-Server Protocol.md

+ 6 - 3
Client-Server Protocol.md

@@ -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: