diff --git a/Assets/gamelog-test.html b/Assets/gamelog-test.html new file mode 100644 index 0000000..970b394 --- /dev/null +++ b/Assets/gamelog-test.html @@ -0,0 +1,72 @@ + + + + Nancy + Owin WebSocket Test + + + + +
+ +
+
+ + diff --git a/Assets/index.html b/Assets/index.html new file mode 100644 index 0000000..552fb5b --- /dev/null +++ b/Assets/index.html @@ -0,0 +1,13 @@ + + + + + + ActServer + + +

ActServer

+ + Copyright © RainbowMage 2015. + + \ No newline at end of file diff --git a/Source/ActServer/resources/actserver.js b/Assets/js/actserver.js similarity index 88% rename from Source/ActServer/resources/actserver.js rename to Assets/js/actserver.js index 2a246c9..c883654 100644 --- a/Source/ActServer/resources/actserver.js +++ b/Assets/js/actserver.js @@ -6,15 +6,15 @@ * @param message {String} [Required] Message to unicast. * @returns {XMLHttpRequest} */ - sendMessage: function (server, to, message) { + sendMessage: function (server, to, body) { if (!server) { - throw "'server' is undefined." + throw "'server' is undefined."; } if (!to) { - throw "'to' is undefined." + throw "'to' is undefined."; } - if (!message) { - throw "'message' is undefined." + if (!body) { + throw "'body' is undefined."; } if (server.charAt(server.length - 1) != "/") { server += "/"; @@ -23,9 +23,9 @@ "action": "sendMessage", "from": "sender", "to": to, - "message": message + "body": body }; - return $.getJSON(server + "message/send", query, function (json) { + return $.getJSON(server + "command/message/send", query, function (json) { if (json.isError) { console.log(json.message); } @@ -37,12 +37,12 @@ * @param message {String} [Required] Message to broadcast. * @returns {XMLHttpRequest} */ - broadcastMessage: function (server, message) { + broadcastMessage: function (server, body) { if (!server) { - throw "'server' is undefined." + throw "'server' is undefined."; } - if (!message) { - throw "'message' is undefined." + if (!body) { + throw "'body' is undefined."; } if (server.charAt(server.length - 1) != "/") { server += "/"; @@ -50,9 +50,9 @@ var query = { "action": "broadcastMessage", "from": "sender", - "message": message + "body": body }; - return $.getJSON(server + "message/send", query, function (json) { + return $.getJSON(server + "command/message/send", query, function (json) { if (json.isError) { console.log(json.message); } @@ -81,13 +81,13 @@ _pollMessage: function(param, controller) { if (!param) { - throw "'param' is undefined." + throw "'param' is undefined."; } if (!param.server) { throw "'server' is not specified."; } if (!param.name) { - throw "'name' is not specified." + throw "'name' is not specified."; } if (param.server.charAt(param.server.length - 1) != "/") { @@ -98,7 +98,7 @@ var _this = this; $.ajax({ dataType: "json", - url: param.server + "message/receive", + url: param.server + "command/message/receive", data: { "action": "requestMessage", "name": param.name, @@ -156,13 +156,13 @@ if (!controller._stopped) { if (!param) { - throw "'param' is undefined." + throw "'param' is undefined."; } if (!param.server) { throw "'server' is not specified."; } if (!param.module) { - throw "'module' is not specified." + throw "'module' is not specified."; } var data = { @@ -180,7 +180,7 @@ var _this = this; $.ajax({ dataType: "json", - url: param.server + param.module, + url: param.server + "command/" + param.module, timeout: param.timeout ? param.timeout : 60000, "data": data, success: function (json) { diff --git a/Source/ActServer/resources/jquery-2.1.1.min.js b/Assets/js/jquery-2.1.1.min.js similarity index 100% rename from Source/ActServer/resources/jquery-2.1.1.min.js rename to Assets/js/jquery-2.1.1.min.js diff --git a/Assets/messaging-websocket-test.html b/Assets/messaging-websocket-test.html new file mode 100644 index 0000000..5ac2994 --- /dev/null +++ b/Assets/messaging-websocket-test.html @@ -0,0 +1,82 @@ + + + + Nancy + Owin WebSocket Test + + + + + +
+ +
+
+ + diff --git a/Source/ActServer/resources/controller.html b/Assets/miniparse-controller.html similarity index 80% rename from Source/ActServer/resources/controller.html rename to Assets/miniparse-controller.html index 8db69db..711f469 100644 --- a/Source/ActServer/resources/controller.html +++ b/Assets/miniparse-controller.html @@ -4,8 +4,8 @@ - - + + - + +