js/clients/SparkCore.js
function () {
        var that = this;
        this.socket.setNoDelay(true);
        this.socket.setKeepAlive(true, 15 * 1000); //every 15 second(s)
        this.socket.on('error', function (err) {
            that.disconnect("socket error " + err);
        });

        this.socket.on('close', function (err) { that.disconnect("socket close " + err); });
        this.socket.on('timeout', function (err) { that.disconnect("socket timeout " + err); });

        this.handshake();
    }
function () {
        var that = this;
        this.socket.setNoDelay(true);
        this.socket.setKeepAlive(true, 15 * 1000); //every 15 second(s)
        this.socket.on('error', function (err) {
            that.disconnect("socket error " + err);
        });

        this.socket.on('close', function (err) { that.disconnect("socket close " + err); });
        this.socket.on('timeout', function (err) { that.disconnect("socket timeout " + err); });

        this.handshake();
    }
function ( ) { var that = this ; this . socket . setNoDelay ( true ) ; this . socket . setKeepAlive ( true , 15 * 1000 ) ; //every 15 second(s) this . socket . on ( 'error' , function ( err ) { that . disconnect ( "socket error " + err ) ; } ) ; this . socket . on ( 'close' , function ( err ) { that . disconnect ( "socket close " + err ) ; } ) ; this . socket . on ( 'timeout' , function ( err ) { that . disconnect ( "socket timeout " + err ) ; } ) ; this . handshake ( ) ; }
configure our socket and start the handshake
configure our socket and start the handshake