neil456
(Neil Tiffin)
1
I have a WebSocket client server based on the example code that is basically working. Client can connect and send request. The server responds, all all is happy. There are two pipeline handlers, BackPressureHandler and my custom ChannelInboundHandler.
Sometimes my server needs to send data to the client that has not been requested. So, what is the strategy to send data from outside of the Channel handler and not in response to an inbound request?
I feel like I am missing something pretty simple.
lukasa
(Cory Benfield)
2
To send data from outside a ChannelHandler, you can use Channel.writeAndFlush.
1 Like
neil456
(Neil Tiffin)
3
That did It. Not sure why I was so dense, but I was trying to save a reference to Context which did not work. Thanks.