template/web-server/public/js/lib/socket.io.js
function Socket (options) {
    this.options = {
        port: 80
      , secure: false
      , document: 'document' in global ? document : false
      , resource: 'socket.io'
      , transports: io.transports
      , 'connect timeout': 10000
      , 'try multiple transports': true
      , 'reconnect': true
      , 'reconnection delay': 500
      , 'reconnection limit': Infinity
      , 'reopen delay': 3000
      , 'max reconnection attempts': 10
      , 'sync disconnect on unload': true
      , 'auto connect': true
      , 'flash policy port': 10843
    };

    io.util.merge(this.options, options);

    this.connected = false;
    this.open = false;
    this.connecting = false;
    this.reconnecting = false;
    this.namespaces = {};
    this.buffer = [];
    this.doBuffer = false;

    if (this.options['sync disconnect on unload'] &&
        (!this.isXDomain() || io.util.ua.hasCORS)) {
      var self = this;

      io.util.on(global, 'unload', function () {
        self.disconnectSync();
      }, false);
    }

    if (this.options['auto connect']) {
      this.connect();
    }
}
function Socket (options) {
    this.options = {
        port: 80
      , secure: false
      , document: 'document' in global ? document : false
      , resource: 'socket.io'
      , transports: io.transports
      , 'connect timeout': 10000
      , 'try multiple transports': true
      , 'reconnect': true
      , 'reconnection delay': 500
      , 'reconnection limit': Infinity
      , 'reopen delay': 3000
      , 'max reconnection attempts': 10
      , 'sync disconnect on unload': true
      , 'auto connect': true
      , 'flash policy port': 10843
    };

    io.util.merge(this.options, options);

    this.connected = false;
    this.open = false;
    this.connecting = false;
    this.reconnecting = false;
    this.namespaces = {};
    this.buffer = [];
    this.doBuffer = false;

    if (this.options['sync disconnect on unload'] &&
        (!this.isXDomain() || io.util.ua.hasCORS)) {
      var self = this;

      io.util.on(global, 'unload', function () {
        self.disconnectSync();
      }, false);
    }

    if (this.options['auto connect']) {
      this.connect();
    }
}
function Socket ( options ) { this . options = { port : 80 , secure : false , document : 'document' in global ? document : false , resource : 'socket.io' , transports : io . transports , 'connect timeout' : 10000 , 'try multiple transports' : true , 'reconnect' : true , 'reconnection delay' : 500 , 'reconnection limit' : Infinity , 'reopen delay' : 3000 , 'max reconnection attempts' : 10 , 'sync disconnect on unload' : true , 'auto connect' : true , 'flash policy port' : 10843 } ; io . util . merge ( this . options , options ) ; this . connected = false ; this . open = false ; this . connecting = false ; this . reconnecting = false ; this . namespaces = { } ; this . buffer = [ ] ; this . doBuffer = false ; if ( this . options [ 'sync disconnect on unload' ] && ( ! this . isXDomain ( ) || io . util . ua . hasCORS ) ) { var self = this ; io . util . on ( global , 'unload' , function ( ) { self . disconnectSync ( ) ; } , false ) ; } if ( this . options [ 'auto connect' ] ) { this . connect ( ) ; } }
Create a new `Socket.IO client` which can establish a persistent
connection with a Socket.IO enabled server.

@api public
Create a new Socket . IO client which can establish a persistent connection with a Socket . IO enabled server .