public @Nullable Object requestToServer(final @NotNull HostAndPort address,
      @NotNull Object request, final int timeout, final boolean replyExpected)
      throws IOException, ClassNotFoundException {
    final long expirationTime = System.currentTimeMillis() + timeout;

    // Get the GemFire version of the TcpServer first, before sending any other request.
    final short serverVersionShort = getServerVersion(address, timeout);
    KnownVersion serverVersion = getKnownVersionOrDefault(getVersion(serverVersionShort), null);
    final String debugVersionMessage;
    if (serverVersion == null) {
      serverVersion = KnownVersion.CURRENT;
      debugVersionMessage =
          "Remote TcpServer version: " + serverVersionShort + " is higher than local version: "
              + KnownVersion.CURRENT_ORDINAL + ". This is never expected as remoteVersion";
    } else {
      debugVersionMessage = null;
    }

    final int newTimeout = (int) (expirationTime - System.currentTimeMillis());
    if (newTimeout <= 0) {
      return null;
    }

    return requestToServer(address, request, newTimeout, replyExpected, serverVersionShort,
        serverVersion, debugVersionMessage);
  }
Send a request to a Locator

@param address The locator's address
@param request The request message
@param timeout Timeout for sending the message and receiving a reply
@param replyExpected Whether to wait for a reply
@return The reply, or null if no reply is expected. This may also return a null
        if we're unable to form a connection to the TcpServer before the given timeout elapses
@throws ClassNotFoundException if the deserializer throws this exception
@throws IOException if there is a problem interacting with the server
geode-tcp-server/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpClient.java