@Override
    public String getHostName() throws UnknownHostException {
        final SocketAddress remoteAddress = channelHandlerContext.channel().remoteAddress();
        if (remoteAddress == null) throw new UnknownHostException();
        final InetSocketAddress socketAddress = (InetSocketAddress) remoteAddress;
        final InetAddress inetAddress = socketAddress.getAddress();
        return inetAddress.getHostName();
    }
Flag that specifies if the connection should be considered closed. Closing a NIO connection
is an asynchronous operation so instead of waiting for the connection to be actually closed just
keep this flag to avoid using the connection between #close was used and the socket is actually
closed.
xmppserver/src/main/java/org/jivesoftware/openfire/nio/NettyConnection.java