<script>
$(document).ready(function(){
var socket = io.connect('localhost:81');
socket.on('connect',function(){
console.log('Подключение к серверу успешно!');
socket.emit('test1','data1');
socket.emit('test2','data2');
});
});
</script>
var socket = io.connect('localhost:81', {transports: ['websocket'], upgrade: false});