summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorLV-426 <lv-426@taproot.org.il>2015-04-09 01:48:13 +0300
committerLV-426 <lv-426@taproot.org.il>2015-04-09 02:03:45 +0300
commitb239c007f5b7dae085f732a2ce007643e758698c (patch)
tree0a82d5c67267f45c3aebc97ce5affa52e6dae8c0 /src/client
parent07b39bac9cc3998144d3ee86803d1a5a3052683b (diff)
rz_mesh.js: rzdoc subscription handling
Diffstat (limited to 'src/client')
-rw-r--r--src/client/rz_mesh.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/client/rz_mesh.js b/src/client/rz_mesh.js
index e32a96b7..a3cb822c 100644
--- a/src/client/rz_mesh.js
+++ b/src/client/rz_mesh.js
@@ -87,8 +87,24 @@ define([ 'util', 'model/diff', 'model/util', 'socketio'], function(util, model_d
rz_mesh_graph_ref.commit_diff__attr(attr_diff);
}
+ function emit__rzdoc_subscribe(rzdoc_name) {
+ var callback = function(data) {
+ console.log('ws: rzdoc subscription acked: rzdoc name: \'' + rzdoc_name + '\'');
+ };
+ socket.emit('rzdoc_subscribe', { rzdoc_name: rzdoc_name}, callback);
+ }
+
+ function emit__rzdoc_unsubscribe(rzdoc_name) {
+ var callback = function(data) {
+ console.log('ws: rzdoc un-subscription acked: rzdoc name: \'' + rzdoc_name + '\'');
+ };
+ socket.emit('rzdoc_unsubscribe', { rzdoc_name: rzdoc_name}, callback);
+ }
+
return {
init : init
+ emit__rzdoc_subscribe: emit__rzdoc_subscribe,
+ emit__rzdoc_unsubscribe: emit__rzdoc_unsubscribe,
};
});