api/easyrtc.js
function isSocketConnected(socket) {
       return socket && (
            (socket.socket && socket.socket.connected) || socket.connected
        );
    }
function isSocketConnected(socket) {
       return socket && (
            (socket.socket && socket.socket.connected) || socket.connected
        );
    }
function isSocketConnected ( socket ) { return socket && ( ( socket . socket && socket . socket . connected ) || socket . connected ) ; }
This function checks if a socket is actually connected.
@private
@param {Object} socket a socket.io socket.
@return true if the socket exists and is connected, false otherwise.
This function checks if a socket is actually connected .