I am trying to implement a four way message exchange between a TCP client and server wherein server first sends a message, receives reply from client and then again does the same. This can be extended to even more messages. How do I keep the connection open between both of them? If there should be an infinite while loop, where to put it? I tried with this on the client side and got an error. I am not concerned with the server here!I am trying to implement a four way message exc