I am trying to combine a Netty client. I need to send a request to the server (which I do not control), and I am waiting for a response.
I'm not quite sure how to return the answer.
So, if I had:
ChannelFuture future = bootstrap.connect(new InetSocketAddress("foo.com", 1654));
Channel connector = future.awaitUninterruptibly().getChannel();
ChannelFuture response = connector.write(query);
How to get response data from a ChannelFuture response? Do I need to add ChannelHandler to the bootstrap pipeline? If so, how do I link the response to the request?
Thank,
source
share