i want to have a persistent connection between a client and server till the clients session ends. Once the client logs on to the server he should remain connected till he logs off. The server transmits data using a C socket while the client receives data through java
Dear Sri Ram, For a persistent connection the client and the server must somehow make an understanding between themselves as to when the server's response ends and when the client next request starts.This could be made possible by setting the ContentLength header.The client then knows after that much response it has the control over the socket again. Inpite of writing the response to the printwriter object you can make use of ByteArrayOutputStream to buffer the output.
Wink, wink, nudge, nudge, say no more, it's a tiny ad:
a bit of art, as a gift, the permaculture playing cards