summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2014-10-18 19:30:27 +0200
committerChristian Pointner <equinox@spreadspace.org>2014-10-18 19:30:27 +0200
commitbe8b8a1f42bdfdb5f008f6d9daf9bb83a1c284a4 (patch)
tree4296d862dd48ce95b7f91818cf87537a96a698c0 /doc
parentsending empty messages works now (almost) (diff)
updated protocol definition
Diffstat (limited to 'doc')
-rw-r--r--doc/protocol.md19
1 files changed, 12 insertions, 7 deletions
diff --git a/doc/protocol.md b/doc/protocol.md
index 3c53a2a..74bdbd2 100644
--- a/doc/protocol.md
+++ b/doc/protocol.md
@@ -4,8 +4,9 @@ Messages
init
----
-The streamer-id and tags are optional. All other fields are mandatory. If the streamer-id
-is not defined all data-update messages must contain a streamer-id.
+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,
@@ -18,15 +19,19 @@ is not defined all data-update messages must contain a streamer-id.
data-update
-----------
-All elements inside data are optional. The update must contain all data gathered between
-start-time and start-time + duration-ms.
-If defined by the init message the streamer-id is optional as well and when present it's
-values override the values of the init message.
+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,
- "streamer-id": { "content-id": "av-orig", "format": "flash", "quality": "medium" },
"data": {
"clients": [
{ "ip": "127.0.0.1", "port": 1234, "bytes-sent": 12094, "user-agent": "Mozilla Version 28", .... },