remote/js/lib/RTRemoteConnectionManager.js
/**
 * create connection from url
 * @param {URL} url the dest url the url object
 * @return {Promise<RTRemoteClientConnection>} the promise with connection
 */
create connection from url
@param {URL} url the dest url the url object
@return {Promise} the promise with connection
create connection from url @param { URL } url the dest url the url object @return { Promise } the promise with connection
function createConnectionFromSpec(url) {
  let connection = null;
  const schema = url.protocol.substr(0, url.protocol.length - 1);
  logger.info(`start connection ${url}`);
  switch (schema) {
    case 'tcp':
      connection = RTRemoteClientConnection.createTCPClientConnection(url.hostname, url.port);
      break;
    default:
      throw new RTException(`unsupported scheme : ${url.protocol}`);
  }
  return connection;
}
function createConnectionFromSpec ( url ) { let connection = null ; const schema = url . protocol . substr ( 0 , url . protocol . length - 1 ) ; logger . info ( ` ${ url } ` ) ; switch ( schema ) { case 'tcp' : connection = RTRemoteClientConnection . createTCPClientConnection ( url . hostname , url . port ) ; break ; default : throw new RTException ( ` ${ url . protocol } ` ) ; } return connection ; }
create connection from url
 @param {URL} url the dest url the url object
 @return {Promise<RTRemoteClientConnection>} the promise with connection
create connection from url @param { URL } url the dest url the url object @return { Promise<RTRemoteClientConnection > } the promise with connection