diff options
Diffstat (limited to 'doc/remote_control_protocol')
-rw-r--r-- | doc/remote_control_protocol | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/doc/remote_control_protocol b/doc/remote_control_protocol new file mode 100644 index 0000000..c42c379 --- /dev/null +++ b/doc/remote_control_protocol @@ -0,0 +1,70 @@ +// this file describing remote control protocol in json format +/ /NOTE: json format does not support comments, all comment line begining with "//" must be removed from file before using it + + +// get list of ids of all runing sessions +// client->server +{ + "cmd": "get_session_list" +} +// server->client +{ + "sessions": [ + "id", + "id", + ... + ] +} + +// destroy session +// client->server +{ + "cmd": "kill", + // one or more session id got by "get_session_list" + "sessions": [ + "sid", + ... + ], + //message for client + "message": "you`re fired", + // set random string as sequence id to associate response with this exact request + // optional parameter + "seq_id": "random_id" +} + +// update connection settings +// client->server +{ + "cmd": "update", + // one or more session id got by "get_session_list" + "sessions": [ + { + "sid": "sid", + "settings": "" + }, + ... + ], + // set random string as sequence id to associate response with this exact request + // optional parameter + "seq_id": "random_id" +} + +// server->client +{ + // status can be one of: "ok", "error" + "status": "ok", + + // response may contain error description in case of error + // optional parameter + "error_description": "some readable information about error", + + // one ore more session id + "sessions": [ + "sid", + ... + ], + + // string passed as "seq_id" in associated request + // optional parameter + "seq_id": "random_id" +} |