code: @Override
    public void setTimeout(int timeout) throws SocketException {
      lock.lock();
      try {
        this.socket.setSoTimeout(timeout);
      } finally {
        lock.unlock();
      }
    }
docs: Sets the connection timeout.
  
  @param timeout the timeout, in milliseconds
  @throws SocketException if there is an error in the underlying protocol, such as a TCP error.