From 8d9c3d7d1c4fc374571edf5c9d547b1190036a19 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Fri, 11 Sep 2020 21:39:18 +0200 Subject: [PATCH] Add userdata field to ServerConnection and Stream. --- static/protocol.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/static/protocol.js b/static/protocol.js index 787d9a6..1ac0261 100644 --- a/static/protocol.js +++ b/static/protocol.js @@ -70,6 +70,12 @@ function ServerConnection() { * @type {Object.} */ this.permissions = {}; + /** + * clientdata is a convenient place to attach data to a ServerConnection. + * It is not used by the library. + * @type{Object.} + */ + this.userdata = {}; /* Callbacks */ @@ -723,6 +729,12 @@ function Stream(sc, id, pc) { * @type {number} */ this.statsHandler = null; + /** + * clientdata is a convenient place to attach data to a Stream. + * It is not used by the library. + * @type{Object.} + */ + this.userdata = {}; /* Callbacks */