lib/Connection.js
function() {
      var t = this, hostName = t.get('hostName'), hostPort = t.get('hostPort'),
      url = t.get('url');

      // Build the URL if not specified
      if (!url) {
        url = t.attributes.url = 'http://' + hostName + ':' + hostPort;
        t.set('url', url);
      }

      // Connect with this url
      var opts = {
        // 'transports': ['websocket', 'xhr-polling', 'jsonp-polling'],
        'force new connection': true,      // Don't re-use existing connections
        'reconnect': false                 // Don't let socket.io reconnect.
                                           // Reconnects are performed by the Router.
      };
      var socket = SocketIO.connect(url, opts);
      t.set({socket:socket}).bindConnectionEvents();
    }
function() {
      var t = this, hostName = t.get('hostName'), hostPort = t.get('hostPort'),
      url = t.get('url');

      // Build the URL if not specified
      if (!url) {
        url = t.attributes.url = 'http://' + hostName + ':' + hostPort;
        t.set('url', url);
      }

      // Connect with this url
      var opts = {
        // 'transports': ['websocket', 'xhr-polling', 'jsonp-polling'],
        'force new connection': true,      // Don't re-use existing connections
        'reconnect': false                 // Don't let socket.io reconnect.
                                           // Reconnects are performed by the Router.
      };
      var socket = SocketIO.connect(url, opts);
      t.set({socket:socket}).bindConnectionEvents();
    }
function ( ) { var t = this , hostName = t . get ( 'hostName' ) , hostPort = t . get ( 'hostPort' ) , url = t . get ( 'url' ) ; // Build the URL if not specified if ( ! url ) { url = t . attributes . url = 'http://' + hostName + ':' + hostPort ; t . set ( 'url' , url ) ; } // Connect with this url var opts = { // 'transports': ['websocket', 'xhr-polling', 'jsonp-polling'], 'force new connection' : true , // Don't re-use existing connections 'reconnect' : false // Don't let socket.io reconnect. // Reconnects are performed by the Router. } ; var socket = SocketIO . connect ( url , opts ) ; t . set ( { socket : socket } ) . bindConnectionEvents ( ) ; }
Initiate a connection with a remote server
Initiate a connection with a remote server