Le 21/03/15 17:33, Nikunj Patel a écrit : > Dear All, > > I am going to develop network application using apache mina where > application continually connected to remote server and also open port for > client connection. When any client send message it will pass to remote > server and response received from remote server it will pass to respective > client which request has sent. My TCP Server must keep live connection with > remote tcp server. > > architecture would be like > > TCP Client1 <------> TCP Server <------> Remote TCP Server > TCP Client2 > . > . > TCP Clientn > > I have no idea how I can response back to tcp client when response received > from remote tcp server. > > Please find attached my sample application for your reference and guide me > how can I achieve it. > The attachement didn't make it.
Regardless, you are just writing a proxy server. I suppose that your proxy send a request to the remote server when it receives a message from your client, so sending back a response to this client when your server receives the response from the remote server is as simple as writing the response into the client session.
