WIP: Responses and scopes

This commit is contained in:
Tristan B. Kildaire 2020-04-18 20:09:33 +02:00
parent 92ed1cb25a
commit 051167cbe3
1 changed files with 27 additions and 1 deletions

28
spec.md
View File

@ -94,4 +94,30 @@ The server configuration looks like this:
"type2" : {"handlerBinary" : "bBin", "unixDomainSocketPath" : "bSock"}
}
}
````
````
### Sending payloads
When it comes to payloads, all that is needed is a field called `payload` that is
a of any JSON type.
Received message (from client to server):
````
"payload" = ...
````
### Receiving responses
When the payload has been passed off from client to server and server to message handler
then the response from the message handler must be as follows:
````
"response" : {
"scope" : "scope",
"type" : "type",
"payload" : ...
}
````
TODO: To field and also add examples of usage