I\'m currently translating an API from C# to Java which has a network component.
The C# version seems to keep the input and output streams and the socket open for th
I suggest you look at using an existing messaging solution like ActiveMQ or Netty. This will handle lot of the issues you may find with messaging.