private void connectToRoomInternal(){
  this.roomState=ConnectionState.NEW;
  String endpoint=connectionParameters.roomId;
  Matcher matcher=IP_PATTERN.matcher(endpoint);
  if (!matcher.matches()) {
    reportError("roomId must match IP_PATTERN for DirectRTCClient.");
    return;
  }
  String ip=matcher.group(1);
  String portStr=matcher.group(matcher.groupCount());
  int port;
  if (portStr != null) {
    try {
      port=Integer.parseInt(portStr);
    }
 catch (    NumberFormatException e) {
      reportError("Invalid port number: " + portStr);
      return;
    }
  }
 else {
    port=DEFAULT_PORT;
  }
  tcpClient=new TCPChannelClient(executor,this,ip,port);
}

private void connectToRoomInternal ( ) { this . roomState = ConnectionState . NEW ; String endpoint = connectionParameters . roomId ; Matcher matcher = IP_PATTERN . matcher ( endpoint ) ; if ( ! matcher . matches ( ) ) { reportError ( "roomId must match IP_PATTERN for DirectRTCClient." ) ; return ; } String ip = matcher . group ( 1 ) ; String portStr = matcher . group ( matcher . groupCount ( ) ) ; int port ; if ( portStr != null ) { try { port = Integer . parseInt ( portStr ) ; } catch ( NumberFormatException e ) { reportError ( "Invalid port number: " + portStr ) ; return ; } } else { port = DEFAULT_PORT ; } tcpClient = new TCPChannelClient ( executor , this , ip , port ) ; }
connects to the room . runs on the looper thread .
