Sfoglia il codice sorgente

Merge branch 'client-server-protocol-notifications-extendedstatus' into 'develop'

Add Notifications and ExtendedStatus to Client-Server protocol

See merge request tobias.wach/ccats!61
Sander, Paul 4 anni fa
parent
commit
165cff618d
1 ha cambiato i file con 59 aggiunte e 0 eliminazioni
  1. 59 0
      Client-Server Protocol.md

+ 59 - 0
Client-Server Protocol.md

@@ -340,6 +340,65 @@ Server:
 }
 ```
 
+### 2.8 Notifications
+
+The `notifications` command allows the logged in user to get a list of notifications since the last time.
+
+Client:
+```
+{
+	"command": "notifications"
+}
+```
+
+Server:
+```
+{
+	"command": "notifications",
+	"accept": bool,
+	"messages": string[], 
+	"error": string
+}
+```
+
+### 2.9 ExtendedStatus
+
+The `extendedstatus` command allows the client to request detailed information about ongoing transfers at the server.
+
+Client:
+```
+{
+	"command": "extendedstatus"
+}
+```
+
+Server:
+```
+{
+    "command": "extendedstatus",
+    "accept": bool,
+    "error": string,
+    "transfersclientserver": {
+        "upload": bool,
+        "file": string,
+        "progress": float
+    }[],
+    "transfersserverserver": {
+        "upload": bool,
+        "file": string,
+        "progress": float,
+        "speed": float,
+        "method": string
+    }[]
+}
+```
+The answer consists of an array of objects, each representing a transfer.
+`upload` indicates, wether the transfer is an up- or download.
+`file` contains the name of the file being transferred.
+`progress` contains the percentage completed.
+`speed` contains the speed in bytes per second.
+`method` contains the covert channel method being used.
+
 ## 3. Close connection
 
 ### 3.1 Close command