code: public void connect(boolean useRtuOverTcp) throws Exception {
          if (!isConnected()) {
              logger.debug("connect()");
  
              // Create a socket without auto-connecting
  
              socket = new Socket();
              socket.setReuseAddress(true);
              socket.setSoLinger(true, 1);
              socket.setKeepAlive(true);
              setTimeout(timeout);
  
              // Connect - only wait for the timeout number of milliseconds
  
              socket.connect(new InetSocketAddress(address, port), timeout);
  
              // Prepare the transport
  
              prepareTransport(useRtuOverTcp);
              connected = true;
          }
      }
docs: Opens this <tt>TCPMasterConnection</tt>.
  
  @param useRtuOverTcp True if the RTU protocol should be used over TCP
  
  @throws Exception if there is a network failure.