summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2016-01-27 20:54:04 +0100
committerOlivier Gayot <duskcoder@gmail.com>2016-01-27 20:54:32 +0100
commita115011735d24ac4f52e41cbfa45ef1d641f2ebd (patch)
tree2c25b3d085bfda0efb89ca6c206ecd016aaad585
parentb5f436e966fea78c722b695c35ba2212968b00ff (diff)
caod: agree on the websocket protocol name
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
-rw-r--r--daemon.c2
-rw-r--r--webapp/cao-common.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/daemon.c b/daemon.c
index e650692..8686f10 100644
--- a/daemon.c
+++ b/daemon.c
@@ -302,7 +302,7 @@ static struct lws_context_creation_info info_g = {
.callback = callback_http_only,
.per_session_data_size = 0,
}, {
- .name = "cao-prot",
+ .name = "game",
.callback = callback_cao_prot,
.per_session_data_size =
sizeof(struct per_session_data_cao_prot),
diff --git a/webapp/cao-common.js b/webapp/cao-common.js
index 0ec516d..66e34f1 100644
--- a/webapp/cao-common.js
+++ b/webapp/cao-common.js
@@ -214,7 +214,7 @@ var CAO = function() {
/* }}} */
this.run = function() {
- ws = new WebSocket('ws://' + document.location.hostname + ':1236');
+ ws = new WebSocket('ws://' + document.location.host, 'game');
ws.onopen = function() {
console.log('connection established');