lib/RtcConnector.js
function(config) {
  var em = new RtcConnector(config);
  var unique = (config && config.unique) ? true : false;
  l('DEBUG') && console.log('createRtcConnector() config is: ',config);
  var key = em.key = createKey(em.config.user||null, em.config.password || null, em.config.server || null, em.config.port || null, em.config.eventPath || 'rtcomm');
  var mon = find(key);
  
  // Monitors not requesting to be UNIQUE.
  var umon = [];
  mon.forEach(function(m){ !m.unique && umon.push(m); });
  if (unique || umon.length === 0) {
    rtcConnectors[em.id] = em;
    return em;
  }
  // return first nonunique that matched the key
  return umon[0] || null;
}
function(config) {
  var em = new RtcConnector(config);
  var unique = (config && config.unique) ? true : false;
  l('DEBUG') && console.log('createRtcConnector() config is: ',config);
  var key = em.key = createKey(em.config.user||null, em.config.password || null, em.config.server || null, em.config.port || null, em.config.eventPath || 'rtcomm');
  var mon = find(key);
  
  // Monitors not requesting to be UNIQUE.
  var umon = [];
  mon.forEach(function(m){ !m.unique && umon.push(m); });
  if (unique || umon.length === 0) {
    rtcConnectors[em.id] = em;
    return em;
  }
  // return first nonunique that matched the key
  return umon[0] || null;
}
function ( config ) { var em = new RtcConnector ( config ) ; var unique = ( config && config . unique ) ? true : false ; l ( 'DEBUG' ) && console . log ( 'createRtcConnector() config is: ' , config ) ; var key = em . key = createKey ( em . config . user || null , em . config . password || null , em . config . server || null , em . config . port || null , em . config . eventPath || 'rtcomm' ) ; var mon = find ( key ) ; // Monitors not requesting to be UNIQUE.
 var umon = [ ] ; mon . forEach ( function ( m ) { ! m . unique && umon . push ( m ) ; } ) ; if ( unique || umon . length === 0 ) { rtcConnectors [ em . id ] = em ; return em ; } // return first nonunique that matched the key
 return umon [ 0 ] || null ; }
Create an RtcConnector and add it to the rtcConnectors pool
Create an RtcConnector and add it to the rtcConnectors pool