protected void setIpAddress(final TProtocol in) {
    TTransport transport = in.getTransport();
    if (!(transport instanceof TSocket)) {
      return;
    }
    setIpAddress(((TSocket)transport).getSocket());
  }
TSetIpAddressProcessor passes the IP address of the Thrift client to the HMSHandler.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/TSetIpAddressProcessor.java