mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Duffy" <gdu...@gmail.com>
Subject Re: Getting an IP from an IOSession
Date Wed, 06 Sep 2006 21:57:43 GMT
You need to downcast SocketAddress to InetSocketAddress.

InetSocketAddress isa = (InetSocketAddress) sa;

HTH,
Greg

On 9/6/06, Johannes U. Jensen <spand@daimi.au.dk> wrote:
> Hi,
>
> I have implemented a StreamIoHandler, and when I receive a
> sessionOpened() I would like to get the ip. I have looked at the
> IOSession object but it only seems to be able to return a SocketAddress
> which doesnt have any methods. How do I get the IP ?
>
> Regards,
> Johannes U. Jensen
>

Mime
View raw message