1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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"
}
|