Can I access SocketChannel from ChannelHandlerContext in Netty?

272 views Asked by At

I'm evaluating Netty as a replacement and/or alternative to our in-house developed network stack. The design is very similar overall and is easy to swap out apart from one issue.

In our server process we sometimes need to access the SocketChannel directly to send data to the client using Channel.transferTo() and I can't see a way to access the SocketChannel in Netty. There is nothing in the ChannelHandlerContext interface for instance.

I will start digging through the source code but does anyone know if this is possible?

Thanks,

Andy.

1

There are 1 answers

2
Norman Maurer On

No there is no way to do this. What you need transferTo(...) for ?