Reputation: 55
I want to get the remoteAddress of the client from itself. I can already connect successfully to the server using:
b.connect(this.hostAddress.getHostAddress(), this.port).sync(); // b is a Bootstrap object
I am using SimpleChannelInboundHandler
for the sake of simplicity.
Upvotes: 1
Views: 2000
Reputation: 23557
In the handler you would do ctx.channel().remoteAddress()
. When using connect you can use f.channel().remoteAddress()
Upvotes: 1