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:
parent
5805e86971
commit
5d66832035
30
spec.md
30
spec.md
|
@ -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"}
|
||||
}
|
||||
````
|
Loading…
Reference in a new issue