Java maintaining a persistent TCP connection
问题 I am trying to send multiple data from server to client using TCP. I want to create only one TCP connection for the entire session. How do I go about doing this? I tried a code with the following flow, but the program stops after the first response is received. Client side 1.create sockets and streams 2.send request for first data 3.wait for response from server 4.send next request <----------- server doesn't seem to handle this request 5.get next response from server Server side 1.Create