fix hardcoded host and port

This commit is contained in:
Seven Du 2013-06-04 08:21:34 +08:00
parent 6739889f65
commit 96f74a9f4a
1 changed files with 3 additions and 1 deletions

View File

@ -471,7 +471,9 @@
<script type="text/javascript">
var socket = new WebSocket("ws://localhost:8086/socket", "websocket");
var port = document.location.port;
// var port = 8081; // for test
var socket = new WebSocket("ws://" + document.location.hostname + ":" + port + "/socket", "websocket");
try {
socket.onopen = function() {