fix hardcoded host and port

This commit is contained in:
Seven Du 2013-06-04 08:21:34 +08:00 committed by Travis Cross
parent 1ffd84b8c1
commit e50b06f49f
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() {