package/EmberSockets.js
function connect(params) {

            /**
             * @property server
             * @type {String}
             */
            var server = '';

            (function determineHost(controller) {

                var host    = $ember.get(controller, 'host'),
                    port    = $ember.get(controller, 'port'),
                    scheme  = $ember.get(controller, 'secure') === true ? 'https' : 'http',
                    path    = $ember.get(controller, 'path') || '';

                if (!host && !port) {
                    return;
                }

                // Use the host to compile the connect string.
                server = !port ? `${scheme}://${host}/${path}`
                               : `${scheme}://${host}:${port}/${path}`;

            })(this);

            // Create the host:port string for connecting, and then attempt to establish
            // a connection.
            var options = $ember.get(this, 'options') || {},
                socket  = $io(params ? params.namespace: server, $jq.extend(options, params || {}));

            socket.on('error', this.error);

            // Store a reference to the socket.
            this.set('socket', socket);

            /**
             * @on connect
             */
            socket.on('connect', Ember.run.bind(this, this._listen));

        }
function connect(params) {

            /**
             * @property server
             * @type {String}
             */
            var server = '';

            (function determineHost(controller) {

                var host    = $ember.get(controller, 'host'),
                    port    = $ember.get(controller, 'port'),
                    scheme  = $ember.get(controller, 'secure') === true ? 'https' : 'http',
                    path    = $ember.get(controller, 'path') || '';

                if (!host && !port) {
                    return;
                }

                // Use the host to compile the connect string.
                server = !port ? `${scheme}://${host}/${path}`
                               : `${scheme}://${host}:${port}/${path}`;

            })(this);

            // Create the host:port string for connecting, and then attempt to establish
            // a connection.
            var options = $ember.get(this, 'options') || {},
                socket  = $io(params ? params.namespace: server, $jq.extend(options, params || {}));

            socket.on('error', this.error);

            // Store a reference to the socket.
            this.set('socket', socket);

            /**
             * @on connect
             */
            socket.on('connect', Ember.run.bind(this, this._listen));

        }
function connect ( params ) { /**
             * @property server
             * @type {String}
             */ var server = '' ; ( function determineHost ( controller ) { var host = $ember . get ( controller , 'host' ) , port = $ember . get ( controller , 'port' ) , scheme = $ember . get ( controller , 'secure' ) === true ? 'https' : 'http' , path = $ember . get ( controller , 'path' ) || '' ; if ( ! host && ! port ) { return ; } // Use the host to compile the connect string. server = ! port ? ` ${ scheme } ${ host } ${ path } ` : ` ${ scheme } ${ host } ${ port } ${ path } ` ; } ) ( this ) ; // Create the host:port string for connecting, and then attempt to establish // a connection. var options = $ember . get ( this , 'options' ) || { } , socket = $io ( params ? params . namespace : server , $jq . extend ( options , params || { } ) ) ; socket . on ( 'error' , this . error ) ; // Store a reference to the socket. this . set ( 'socket' , socket ) ; /**
             * @on connect
             */ socket . on ( 'connect' , Ember . run . bind ( this , this . _listen ) ) ; }
Responsible for establishing a connect to the Socket.io server.

@method connect
@param [params={}] {Object}
@return {void}
Responsible for establishing a connect to the Socket . io server .