users@grizzly.java.net

Re: grizzly 2.0 : converting server, issue 1

From: Oleksiy Stashok <Oleksiy.Stashok_at_Sun.COM>
Date: Sun, 03 May 2009 10:46:13 +0200

Hi Nick,

>
> /**
> * @return address of remote host
> */
> public String getRemoteAddr() {
> return socket.getInetAddress().getHostName() + " ("
> + socket.getInetAddress().getHostAddress() + ")";
> }
>
> Any suggestions?
this should be easy:

InetSocketAddress address = (InetSocketAddress)
ctx.getConnection().getPeerAddress();

WBR,
Alexey.

>
>
> Thanks
> Nick
>
> Get the New Internet Explore 8 Optimised for MSN. Download Now