summaryrefslogtreecommitdiff
path: root/doc/protocol.md
blob: 74bdbd29bf3443306e9953a1217e6edfa01b05dc (plain) (blame)
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
Messages
========

init
----

All fields except version are optional. The values in this message are treated as
defaults which will be used if the corresponding value is missing in subsequent
update messages.

{
  "version": 1,
  "hostname": "myhostname",
  "streamer-id": { "content-id": "av-orig", "format": "flash", "quality": "medium" },
  "tags": [ "elevate", "2014", "discourse" ]
}


data-update
-----------

All values which have been defined by the init message are optional. In any case the
values from data updates override values from init. Stateless interfaces will not use
init messages and therefore all values must be defined here.
If an interface (i.e. REST) has other means to detect protocol versions the version
field may be omitted entirely.

{
  "version": 1,
  "hostname": "myhostname",
  "streamer-id": { "content-id": "av-orig", "format": "flash", "quality": "medium" },
  "tags": [ "elevate", "2014", "discourse" ]
  "start-time": "2014-08-03T12:34:56.123Z",
  "duration-ms": 5000,
  "data": {
    "clients": [
       { "ip": "127.0.0.1", "port": 1234, "bytes-sent": 12094, "user-agent": "Mozilla Version 28", .... },
        .....
    ],
    "client-count": 12,
    "bytes-received": 12345,
    "bytes-sent": 921734098,
     ....
  }
}