Open xiaofeilee opened 10 years ago
server: socket.emit("test", "123456"); client: var socket = io.connect(SocketJS.connectUrl); //socket.on('connect', function(){ //alert('连接socket成功'); //}); socket.on('test', function(data){ alert('test ' + data); //not work why? });
server: socket.emit("test", "123456"); client: var socket = io.connect(SocketJS.connectUrl); //socket.on('connect', function(){ //alert('连接socket成功'); //});
socket.on('test', function(data){
alert('test ' + data); //not work why? });