From 5d668320356b8342bfab4cc1cec8f52dc73c4b45 Mon Sep 17 00:00:00 2001 From: "Tristan B. Kildaire" Date: Fri, 17 Apr 2020 13:46:45 +0200 Subject: [PATCH] Added information on message handlers --- spec.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/spec.md b/spec.md index fed22bd..aab47ee 100644 --- a/spec.md +++ b/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"} +} ```` \ No newline at end of file