I'm not an expert in Netty - and I hope I understood your question - but....

It looks like there's a "remoteAddress()" on Channel (name different in
netty 4 vs. 3).

http://netty.io/4.0/api/io/netty/channel/Channel.html#remoteAddress()

Note that this can deceive if there's a gateway / proxy in play.

See:

https://stackoverflow.com/questions/11865165/netty-getting-remote-ip-address-in-messagereceived


On Thu, Jul 9, 2015 at 5:46 PM, Craig Ching <craigch...@gmail.com> wrote:

> Hi all,
>
> I'm wondering if there's a way to get the remote client's hostname/ip
> address when we're using Netty.  Normally we'd just use @Context
> HttpServletRequest and getRemoteAddr() method, but we're in Netty and don't
> have that available to us.
>
> Is there any way we could do this?  Possibly writing an "interceptor" or
> whatever it's called now?  We're using RestEasy 3.0.10.Final and netty
> 4.0.25.Final if that helps.
>
> Cheers,
> Craig
>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> Resteasy-users mailing list
> Resteasy-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/resteasy-users
>
>
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users

Reply via email to