src/connection.js
function Connection(uri) {
    this.channels = {};
    let version = require('../package.json').version;
    let opts = {
        query: 'instanceId=' + 'js_cli_' + version,
        'sync disconnect on unload': true,
        path: '/syncsocket'
    };
    this.socket = io.connect(uri, opts);
    this.bindEvents();
}
function Connection(uri) {
    this.channels = {};
    let version = require('../package.json').version;
    let opts = {
        query: 'instanceId=' + 'js_cli_' + version,
        'sync disconnect on unload': true,
        path: '/syncsocket'
    };
    this.socket = io.connect(uri, opts);
    this.bindEvents();
}
function Connection ( uri ) { this . channels = { } ; let version = require ( '../package.json' ) . version ; let opts = { query : 'instanceId=' + 'js_cli_' + version , 'sync disconnect on unload' : true , path : '/syncsocket' } ; this . socket = io . connect ( uri , opts ) ; this . bindEvents ( ) ; }
Creates new `Connection` object
@param uri URI of SyncSocket server (e.g. http://localhost:5579)
@constructor
@public
Creates new Connection object