1
0
Fork 0
mirror of https://github.com/besterprotocol/besterd synced 2023-12-13 21:00:32 +01:00

Added information on message handlers

This commit is contained in:
Tristan B. Kildaire 2020-04-17 13:46:45 +02:00
parent 5805e86971
commit 5d66832035

30
spec.md
View file

@ -60,4 +60,34 @@ Received message:
"password" : "password"
}
}
````
There *MUST* also be a field in the original JSON message named `payload`,
the JSON type doesn't matter.
Received message:
````
"header" : {
"scope" : "scope",
"type" : "type",
"authentication" : {
"username" : "username",
"password" : "password"
}
},
"payload" : anything
````
## Message handling
The way messages are handled depends on their `type`. The way the server deals with it
works like this.
The server configuration looks like this:
````
"handlers" : {
"type1" : {"handlerBinary"}
}
````