Files
deb-python-autobahn/examples/twisted/websocket/wxpython/client.html
Tobias Oberstein 376c8d264f add wxPython example
2014-07-01 23:31:41 +02:00

24 lines
592 B
HTML

<!doctype html>
<html>
<body>
<h1>wxPython/Autobahn WebSocket Demo</h1>
<p>Please open the JavaScript console to see what's going on.</p>
<script>
var sock = new WebSocket("ws://127.0.0.1:9000");
sock.onopen = function () {
console.log("connected");
}
sock.onclose = function (evt) {
console.log("connection lost", evt.reason);
sock = null;
}
sock.onmessage = function (evt) {
console.log("message received", evt.data);
}
</script>
</body>
</html>