|
@@ -109,21 +109,14 @@ Client:
|
|
|
{
|
|
|
"command": "put",
|
|
|
"data": string,
|
|
|
- "finish": bool
|
|
|
+ "remaining": int,
|
|
|
+ "cancel": bool
|
|
|
}
|
|
|
```
|
|
|
`data` is a base64 string and contains a piece of the file. The client will loop this until the file is completely sent.
|
|
|
-In the last request the client has to set the `finish` flag to `true`.
|
|
|
-<br>
|
|
|
-After the last part was received the server answers with `finish` set to `true`.
|
|
|
-<br>
|
|
|
-Server:
|
|
|
-```
|
|
|
-{
|
|
|
- "command": "put",
|
|
|
- "finish": bool
|
|
|
-}
|
|
|
-```
|
|
|
+`remaining` is a counter how many chunks will follow and the transfer is over after it hits `0`.
|
|
|
+If `cancel` is `true` the file transfer will be canceled.
|
|
|
+
|
|
|
|
|
|
### 2.4 Get command
|
|
|
Client:
|
|
@@ -148,11 +141,13 @@ Server:
|
|
|
{
|
|
|
"command": "get",
|
|
|
"data": string,
|
|
|
- "finish": bool
|
|
|
+ "remaining": int,
|
|
|
+ "cancel": bool
|
|
|
}
|
|
|
```
|
|
|
`data` is a base64 string and contains a piece of the file. The server will loop this until the file is completely sent.
|
|
|
-In the last request the server has to set the `finish` flag to `true`.
|
|
|
+`remaining` is a counter how many chunks will follow and the transfer is over after it hits `0`.
|
|
|
+If `cancel` is `true` the file transfer will be canceled.
|
|
|
|
|
|
|
|
|
### TODO
|