add support for all ports

This commit is contained in:
加里
2014-09-18 13:36:27 +08:00
parent e6da97a098
commit f5448677ac
7 changed files with 50 additions and 17 deletions

View File

@@ -176,7 +176,8 @@ seajs.use(['$','Underscore' ,'Backbone'], function($, _, Backbone) {
alert("WebSocket is required. Please use a modern browser.");
return;
}
var dataSocket = new WebSocket("ws://127.0.0.1:8003");
var socketPort = $("#socketPort").val() || "8003",
dataSocket = new WebSocket("ws://127.0.0.1:" + socketPort);
dataSocket.onopen = function(){}
dataSocket.onmessage = function(event){