eben noch fix den websocket host und port dynamisch gemacht
This commit is contained in:
parent
47ffb7c1f6
commit
ffc7352e4d
|
@ -21,8 +21,7 @@
|
||||||
$(document).ready(
|
$(document).ready(
|
||||||
function() {
|
function() {
|
||||||
var Socket = "MozWebSocket" in window ? MozWebSocket : WebSocket;
|
var Socket = "MozWebSocket" in window ? MozWebSocket : WebSocket;
|
||||||
ws = new MozWebSocket("ws://localhost:8080/bunti_server/bunti");
|
ws = new Socket("ws://" + window.location.hostname + ":" + window.location.port + "/bunti_server/bunti");
|
||||||
//ws = new MozWebSocket("ws://localhost:8080/grizzly-websockets-chat/chat");
|
|
||||||
|
|
||||||
ws.onmessage = function (message) {
|
ws.onmessage = function (message) {
|
||||||
//$("#messages").append("<p>" + message.data + "</p>");
|
//$("#messages").append("<p>" + message.data + "</p>");
|
||||||
|
|
Loading…
Reference in New Issue