public Socket getSocket() {
    if (wrapped instanceof TSocket) {
      return (((TSocket)wrapped).getSocket());
    }

    return null;
  }
If the underlying TTransport is an instance of TSocket, it returns the Socket object
which it contains.  Otherwise it returns null.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/security/TUGIContainingTransport.java