users@grizzly.java.net

grizzly 2.0 : converting server, issue 1

From: buzz lightyear <buzzheavyyear_at_hotmail.com>
Date: Fri, 1 May 2009 13:25:49 +0000

Hi

I'm converting a tcp server to grizzy 2 and I have the following code that I need to embed in a FilterAdapter, but I can't work out how to get the remote hostname/address from the FilterChainContext


    /**
     * @return address of remote host
     */
    public String getRemoteAddr() {
        return socket.getInetAddress().getHostName() + " ("
                + socket.getInetAddress().getHostAddress() + ")";
    }

Any suggestions?

Thanks
Nick

_________________________________________________________________
Beyond Hotmail — see what else you can do with Windows Live.
http://clk.atdmt.com/UKM/go/134665375/direct/01/