|
@@ -113,23 +113,44 @@ Server:
|
|
|
```
|
|
|
|
|
|
### 2.2 List command
|
|
|
+List is split in two commands. `list` to request a list download and `getlist` to download the list.
|
|
|
+
|
|
|
+#### 2.2.1 list - request file list download
|
|
|
Client:
|
|
|
```
|
|
|
{
|
|
|
"command": "list"
|
|
|
}
|
|
|
```
|
|
|
-
|
|
|
Server:
|
|
|
```
|
|
|
{
|
|
|
"command": "list",
|
|
|
- "names": string[],
|
|
|
- "sizes": int[],
|
|
|
- "remaining": int
|
|
|
+ "accept": bool,
|
|
|
+ "items": int,
|
|
|
+ "chunks": int
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
+#### 2.2.2 getlist - download file list
|
|
|
+Client:
|
|
|
+```
|
|
|
+{
|
|
|
+ "command": "getlist",
|
|
|
+ "chunk": int,
|
|
|
+ "cancel": bool
|
|
|
+}
|
|
|
+```
|
|
|
+Server:
|
|
|
+```
|
|
|
+{
|
|
|
+ "command": "getlist",
|
|
|
+ "remaining": int,
|
|
|
+ "cancel": bool,
|
|
|
+ "names": string[]
|
|
|
}
|
|
|
```
|
|
|
-The server loops this until all names have been sent and `remaining` hits `0`.
|
|
|
+The client has to request every chunk until all names have been sent and `remaining` hits `0`.
|
|
|
|
|
|
|
|
|
### 2.3 Put command
|