-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move resource files into Asset directory. Add GameLogModule which serves game logs using WebSocket (Requires Windows 8+). (This feature is WIP.) Referenced assemblies are moved into "libraries" directory after build. Remove unused Util class.
- Loading branch information
1 parent
f4be06d
commit eee0ff7
Showing
43 changed files
with
1,846 additions
and
302 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<!DOCTYPE html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Nancy + Owin WebSocket Test</title> | ||
<style> | ||
body::-webkit-scrollbar { | ||
display: none; | ||
} | ||
html::-webkit-scrollbar { | ||
display: none; | ||
} | ||
#container::-webkit-scrollbar { | ||
display: none; | ||
} | ||
* { font-size: 0.8em; } | ||
html, body { height: 100%; margin: 0; padding: 0; overflow: hidden; } | ||
#container { height: 100%; display: flex; flex-flow: column; } | ||
#header { flex: 0 0 auto; } | ||
#output { flex: 0 1 auto; overflow: scroll; } | ||
#output p { line-height: 80%; } | ||
</style> | ||
</head> | ||
<body style=" max-height: 100%;"> | ||
<script> | ||
//var wsUri = "ws://echo.websocket.org/"; | ||
var wsUri = "ws://localhost:23456/websocket/log"; | ||
var output, websocket; | ||
function init() { | ||
output = document.getElementById("output"); | ||
testWebSocket(); | ||
} | ||
function testWebSocket() { | ||
websocket = new WebSocket(wsUri); | ||
websocket.onopen = function (evt) { onOpen(evt); }; | ||
websocket.onclose = function (evt) { onClose(evt); }; | ||
websocket.onmessage = function (evt) { onMessage(evt); }; | ||
websocket.onerror = function (evt) { onError(evt); }; | ||
} | ||
function onOpen(evt) { | ||
writeToScreen("CONNECTED"); | ||
} | ||
function onClose(evt) { | ||
writeToScreen("DISCONNECTED"); | ||
} | ||
function onMessage(evt) { | ||
writeToScreen('<span style="color: blue;">LOG: ' + evt.data + '</span>'); | ||
} | ||
function onError(evt) { | ||
writeToScreen('<span style="color: red;">ERROR:</span> ' + evt.data); | ||
} | ||
function doSend(message) { | ||
writeToScreen("SENT: " + message); | ||
websocket.send(message); | ||
} | ||
function writeToScreen(message) { | ||
var pre = document.createElement("p"); | ||
pre.style.wordWrap = "break-word"; | ||
pre.innerHTML = message; | ||
output.appendChild(pre); | ||
output.scrollTop = output.scrollHeight; | ||
} | ||
window.addEventListener("load", init, false); | ||
</script> | ||
<div id="container" style="overflow:scroll;"> | ||
<div id="header"> | ||
<h1>Log receiving test</h2> | ||
<button onclick="output.innerHTML = ''">Clear</button> | ||
</div> | ||
<div id="output" style=""></div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
|
||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>ActServer</title> | ||
</head> | ||
<body> | ||
<h1>ActServer</h1> | ||
|
||
Copyright © RainbowMage 2015. | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<!DOCTYPE html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Nancy + Owin WebSocket Test</title> | ||
<style> | ||
body::-webkit-scrollbar { | ||
display: none; | ||
} | ||
html::-webkit-scrollbar { | ||
display: none; | ||
} | ||
#container::-webkit-scrollbar { | ||
display: none; | ||
} | ||
* { font-size: 0.8em; } | ||
html, body { height: 100%; margin: 0; padding: 0; overflow: hidden; } | ||
#container { height: 100%; display: flex; flex-flow: column; } | ||
#header { flex: 0 0 auto; } | ||
#output { flex: 0 1 auto; overflow: scroll; } | ||
#output p { line-height: 80%; } | ||
</style> | ||
</head> | ||
<body style=" max-height: 100%;"> | ||
<script src="js/jquery-2.1.1.min.js" type="text/javascript"></script> | ||
<script> | ||
//var wsUri = "ws://echo.websocket.org/"; | ||
var wsUri = "ws://localhost:23456/websocket/message" + "?name=messaging-websocket-test"; | ||
var output, websocket; | ||
function init() { | ||
output = document.getElementById("output"); | ||
testWebSocket(); | ||
} | ||
function testWebSocket() { | ||
websocket = new WebSocket(wsUri); | ||
websocket.onopen = function (evt) { onOpen(evt); }; | ||
websocket.onclose = function (evt) { onClose(evt); }; | ||
websocket.onmessage = function (evt) { onMessage(evt); }; | ||
websocket.onerror = function (evt) { onError(evt); }; | ||
} | ||
function onOpen(evt) { | ||
writeToScreen("CONNECTED"); | ||
doSend("hello"); | ||
} | ||
function onClose(evt) { | ||
writeToScreen("DISCONNECTED"); | ||
} | ||
function onMessage(evt) { | ||
try | ||
{ | ||
var message = $.parseJSON(evt.data); | ||
writeToScreen('<span style="color: blue;">MESSAGE: from: ' + message.from + ", body:" + message.body + '</span>'); | ||
} | ||
catch (e) | ||
{ | ||
console.log(evt.data); | ||
} | ||
} | ||
function onError(evt) { | ||
writeToScreen('<span style="color: red;">ERROR:</span> ' + evt.data); | ||
} | ||
function doSend(message) { | ||
writeToScreen("SENT: " + message); | ||
websocket.send('{ "from": "messaging-websocket-test", "body": "hello" }'); | ||
} | ||
function writeToScreen(message) { | ||
var pre = document.createElement("p"); | ||
pre.style.wordWrap = "break-word"; | ||
pre.innerHTML = message; | ||
output.appendChild(pre); | ||
output.scrollTop = output.scrollHeight; | ||
} | ||
window.addEventListener("load", init, false); | ||
</script> | ||
<div id="container" style="overflow:scroll;"> | ||
<div id="header"> | ||
<h1>Messaging test</h2> | ||
<button onclick="doSend('hello')">Send</button> | ||
</div> | ||
<div id="output" style=""></div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.