src/channel.js
function Channel(server, opts) {
    this.server = server;
    opts = opts || {};
    this.channelId = opts.channelId;
    this.timeserver = opts.timeserver || this.server.timeserverUrl();

    this.clients = [];
    this.clientStates = {};

    // Hackery
    this.setMaxListeners(150);

    this.clockClient = new ClockClient(this.timeserver);
    this.sync();
}
function Channel(server, opts) {
    this.server = server;
    opts = opts || {};
    this.channelId = opts.channelId;
    this.timeserver = opts.timeserver || this.server.timeserverUrl();

    this.clients = [];
    this.clientStates = {};

    // Hackery
    this.setMaxListeners(150);

    this.clockClient = new ClockClient(this.timeserver);
    this.sync();
}
function Channel ( server , opts ) { this . server = server ; opts = opts || { } ; this . channelId = opts . channelId ; this . timeserver = opts . timeserver || this . server . timeserverUrl ( ) ; this . clients = [ ] ; this . clientStates = { } ; // Hackery this . setMaxListeners ( 150 ) ; this . clockClient = new ClockClient ( this . timeserver ) ; this . sync ( ) ; }
Channel constructor.
@type {Channel}
@param {Server} server The server object
@param {object} opts Options
@param {string} opts.channelId The channel id (string). If not passed, will generate a random one
@param {string} opts.timeserver The timeserver which channel will use (if not set, will use the server's default)
@param {boolean} opts.autoSyncClients  Automatically instruct unsynchronized clients to re-synchronize
@constructor
@public
Channel constructor .