Seperate TCP Client and TCP Server that uses Spring Integration framework for connection.
This solution is TCP Client Server application written in Spring Integration Framework to allow Spring Client to connect to a Server using TCP-Oubound-Gateway and register channels through which it expects response from Server.
Similarly TCP Server receives the request from TCP-Inbound-Gateway process the request based on some Service Activator assigned to the input channel and returns appropriate response to the Client.
Code can be structured according to the requirement.
Please contribute by reviewing or updating the code , in case you may find any issue in the Solution.
Thanks.