是否需要使用socket_lifetime_protector数组。套接字是否在功能范围之外被销毁。
var socket_lifetime_protector = []; // Is this necessary to protect the lifetime of socket
function createNewSocket(username)
{
var socket = require('socket.io-client')('http://localhost:3000');
socket_lifetime_protector.push(socket); // Is this required
socket.on('some_signal', function() {...});
}