I need to open a TCP/IP client connection with my Netty Server business handler.
So
- Receive request on server socket, keep socket open
- Go through the pipleine and reach business handler…
- In business handler open asynch client connection, send request to 3rd party
- When response received from 3rd party reply back to originating client.
So in the “business” handler is there a way to fire asynch call to 3rd party and then when the 3rd party replies back some how attach back to that channel and reply back to the origin?
Or just simply, in the business handler open to 3rd party, send, receive, reply back close channel.
It’s bassicaly a 1 to 1 type of thing 1 request made, 1 request/response from 3rd party, respond back with result.
I think you are looking for something which is kind of similar to what we do in the netty examples. It’s not 100% the same but kind of. Checkout the Proxy example source code:
https://github.com/netty/netty/tree/3.2/src/main/java/org/jboss/netty/example/proxy