Hi,
I  am Using a Socket client to send a http request to sever and then waits
to read response from the socket inputstream..

1. I have a comet servlet. On its read event it starts a new thread passing
the request and response object.

2.The read event code block then returns.
3. The thread started in the read event starts writing the responses in the
response stream.
PrintWriter writer =response.getWriter();
writer.write("asynresponse");

4. after writing say 5 responses i want to just close the request and
response (not the socket which sent the request)
Sending header Connection:close closes the Socket

How do i do this?

Since i cannot trigger the Comet servlet END event explicitly, where/how
can I call event.close();

I tried passing the event object from the read event to the thread and
called event.close in the thread. But an exception was
thrown saying event object is no longer  associated with the request and
response.

Thanks,
Animesh

P.S: BTW Kudos to the forum. Is is so alive. have been sending queries since
some days and got replies.
Also just to let u know i have a business problem where a http request and
response are to be served using comet asyncronously on the same socket
connection.

So i have a single socket client which wants to send http request again and
again (pipeline) and waits for a asyn response from the comet server. trying
a POC for the same.
Any ideas for concrete pipelining clients would be greatly appreciated.

Thanks,
Animesh

Reply via email to