Sfoglia il codice sorgente

Remove sid for version 0.1

anon 5 anni fa
parent
commit
d137fc0e8f
1 ha cambiato i file con 10 aggiunte e 16 eliminazioni
  1. 10 16
      Client-Server Protocol.md

+ 10 - 16
Client-Server Protocol.md

@@ -1,40 +1,37 @@
 # Client-Server Protocol
 
+Protocol version: "0.1"
+
 ## 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 is accomplished and the sessionID of the client was valid or if step 1.1 and 1.2 have been accomplished a usable connection is negotiated.
+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.
 
 ### 1.1 Version check
 Client:
 ```
 {
-	"version": string,
-	"sid": string
+	"version": string
 }
 ```
-Only sends `sid` if client has an old sessionID.
 
 
 Server:
 ```
 {
 	"version": string,
-	"accept": bool,
-	"sid": string
+	"accept": bool
 }
 ```
 
-If `accept` is `true` the connection is valid. Else the connection will be terminated.
-`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!
+If `accept` is `true` the connection is valid. Else the connection will be terminated after the server answered.
 
 ### 1.2 Login
 Client:
 ```
 {
 	"user": string,
-	"pass": string,
-	"sid": string
+	"pass": string
 }
 ```
 
@@ -45,8 +42,7 @@ Server:
 }
 ```
 
-If `accept` is `true` the connection is valid and the user is logged in. Else the connection will be terminated.
-The server is not obligated to send `sid` back.
+If `accept` is `true` the connection is valid and the user is logged in. Else the connection will be terminated after the server answered.
 
 
 ## 2. Sending commands
@@ -80,11 +76,9 @@ Server:
 Client:
 ```
 {
-	"command": "close",
-	"remembersID": bool
+	"command": "close"
 }
 ```
-`remembersID` is optional. If it's `true` then the sID shall be remembered by the server. Else it shall be forgotten.
 
 
 Server: