aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/connection.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/js/connection.js')
-rw-r--r--web/src/js/connection.js48
1 files changed, 24 insertions, 24 deletions
diff --git a/web/src/js/connection.js b/web/src/js/connection.js
index 1f2daeef..3911d3f2 100644
--- a/web/src/js/connection.js
+++ b/web/src/js/connection.js
@@ -4,30 +4,30 @@ function _Connection(root) {"use strict";
}
this.root = root;
}
- _Connection.prototype.init=function() {"use strict";
- this.openWebSocketConnection();
- };
- _Connection.prototype.openWebSocketConnection=function() {"use strict";
- this.ws = new WebSocket(this.root.replace("http", "ws") + "/ws");
- var ws = this.ws;
+_Connection.prototype.init=function() {"use strict";
+ this.openWebSocketConnection();
+};
+_Connection.prototype.openWebSocketConnection=function() {"use strict";
+ this.ws = new WebSocket(this.root.replace("http", "ws") + "/ws");
+ var ws = this.ws;
- ws.onopen = this.onopen.bind(this);
- ws.onmessage = this.onmessage.bind(this);
- ws.onerror = this.onerror.bind(this);
- ws.onclose = this.onclose.bind(this);
- };
- _Connection.prototype.onopen=function(open) {"use strict";
- console.log("onopen", this, arguments);
- };
- _Connection.prototype.onmessage=function(message) {"use strict";
- //AppDispatcher.dispatchServerAction(...);
- console.log("onmessage", this, arguments);
- };
- _Connection.prototype.onerror=function(error) {"use strict";
- console.log("onerror", this, arguments);
- };
- _Connection.prototype.onclose=function(close) {"use strict";
- console.log("onclose", this, arguments);
- };
+ ws.onopen = this.onopen.bind(this);
+ ws.onmessage = this.onmessage.bind(this);
+ ws.onerror = this.onerror.bind(this);
+ ws.onclose = this.onclose.bind(this);
+};
+_Connection.prototype.onopen=function(open) {"use strict";
+ console.log("onopen", this, arguments);
+};
+_Connection.prototype.onmessage=function(message) {"use strict";
+ //AppDispatcher.dispatchServerAction(...);
+ console.log("onmessage", this, arguments);
+};
+_Connection.prototype.onerror=function(error) {"use strict";
+ console.log("onerror", this, arguments);
+};
+_Connection.prototype.onclose=function(close) {"use strict";
+ console.log("onclose", this, arguments);
+};
var Connection = new _Connection();