Skip to content
Browse files

Update protocol to represent current implementation

  • Loading branch information...
1 parent cbfd6bf commit 7e0ca47f547aec4cb8d264de0578b80473d8a691 @richo committed
Showing with 9 additions and 7 deletions.
  1. +9 −7 PROTOCOL.md
View
16 PROTOCOL.md
@@ -22,27 +22,29 @@ Protocol Specification for groundstation
## Transfer of data
-* Data is requested by sending a serialized hash, with the keys:
+* Data transfer takes place by sending packs `msg length``NUL``protobuf` to peers.
+* msg length is sent ascii encoded for ease or porting and debugging.
+#### Requests take the form
```javascript
{
"type": REQUEST,
- "request": KEYWORD, // KEYWORDs include LISTALLOBJECTS FETCHOBJECT
- "id": UUID // UUID shall be a uuid to marry up with the response
+ "verb": KEYWORD, // KEYWORDs include LISTALLOBJECTS FETCHOBJECT
+ "id": UUID, // UUID shall be a uuid to marry up with the response
+ "payload": PAYLOAD or NULL
}
```
-* Data shall be replied to with a similar hash,
-
+#### Responses take the form
```javascript
{
"type": RESPONSE,
- "phrase": KEYWORD, // KEYWORDs include TRANSFER and TERMINATE. more than a
+ "verb": KEYWORD, // KEYWORDs include TRANSFER and TERMINATE. more than a
// single response is valid for a request, TERMINATE
// signifies that the storage allocated to the request
// may be freed
"id": UUID, // The UUID sent with the request. In the case
- "payload": PAYLOAD // The payload associated with the request. request type specific.
+ "payload": PAYLOAD or NULL
}
```

0 comments on commit 7e0ca47

Please sign in to comment.
Something went wrong with that request. Please try again.