remote/js/lib/RTRemoteProtocol.js
/**
   * init protocol, it will open tranport first if transport not opened
   * @return {Promise<RTRemoteProtocol>} promise with RTRemoteProtocol instance
   */
init protocol, it will open tranport first if transport not opened
@return {Promise} promise with RTRemoteProtocol instance
init protocol it will open tranport first if transport not opened @return { Promise } promise with RTRemoteProtocol instance
init() {
    return new Promise((resolve, reject) => {
      if (!this.transportOpened) {
        this.transport.open().then(() => { 
          this.mRunning = true;
          this.start();
          resolve(this);
        }).catch(err => reject(err));
      } else {
        this.mRunning = true;
        this.start();
        resolve(this);
      }
    });
  }
init ( ) { return new Promise ( ( resolve , reject ) => { if ( ! this . transportOpened ) { this . transport . open ( ) . then ( ( ) => { this . mRunning = true ; this . start ( ) ; resolve ( this ) ; } ) . catch ( err => reject ( err ) ) ; } else { this . mRunning = true ; this . start ( ) ; resolve ( this ) ; } } ) ; }
init protocol, it will open tranport first if transport not opened
 @return {Promise<RTRemoteProtocol>} promise with RTRemoteProtocol instance
init protocol it will open tranport first if transport not opened @return { Promise<RTRemoteProtocol > } promise with RTRemoteProtocol instance
// open first