Re: how to close a comet request outside of an event?

2007-04-29 Thread Peter Rossbach
Hmm, good point, but the HTTP/1.1 Spec RFC2616 (chapter 8.1, 14.10) not describe that server must close the connection as header Connection: close is set. This means that tomcat currently wait for socket timeout before connection is close. I have analyse the tomcat 6 trunk and see that we

Re: how to close a comet request outside of an event?

2007-04-28 Thread Martin Perez
On 4/28/07, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote: Hi, >> The request, wait, async response + close pattern seems to be a >> pretty common use case though, especially with server side push >> (AJAX), so it would still be good to have a solution that works well >> allways. > Yes, and for t

Re: how to close a comet request outside of an event?

2007-04-28 Thread Sebastiaan van Erk
Hi, The request, wait, async response + close pattern seems to be a pretty common use case though, especially with server side push (AJAX), so it would still be good to have a solution that works well allways. Yes, and for this you don't need Comet, you need "Asynchronous Servlets" they are so

Re: how to close a comet request outside of an event?

2007-04-27 Thread Filip Hanik - Dev Lists
Sebastiaan van Erk wrote: Hi, * Is it possible, somehow, to end a request asynchronously (that is, outside the event method)? Because I keep getting "Out of file descriptor errors" since the END events come so terribly late after I do the close(). you'd still get "too many open files" errors

Re: how to close a comet request outside of an event?

2007-04-27 Thread Sebastiaan van Erk
Hi, * Is it possible, somehow, to end a request asynchronously (that is, outside the event method)? Because I keep getting "Out of file descriptor errors" since the END events come so terribly late after I do the close(). you'd still get "too many open files" errors even if it did close since

Re: how to close a comet request outside of an event?

2007-04-27 Thread Filip Hanik - Dev Lists
Sebastiaan van Erk wrote: Rémy Maucherat wrote: On 4/26/07, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote: I don't understand why the client does not get an immediate -1 (EOF) on the read() as soon as I do this. The socket itself does not need to be closed, but the output stream close should flu

Re: how to close a comet request outside of an event?

2007-04-26 Thread Sebastiaan van Erk
Hi, I've been thinking about this a bit more, and I understand why normally the response.close() should not go to the TCP layer: I'd forgotten all about request pipelining. However, in my case, the request has an explicit "Connection: close" header. Would not this case warrent an immediate s

Re: how to close a comet request outside of an event?

2007-04-26 Thread Sebastiaan van Erk
Rémy Maucherat wrote: On 4/26/07, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote: I don't understand why the client does not get an immediate -1 (EOF) on the read() as soon as I do this. The socket itself does not need to be closed, but the output stream close should flush the output stream and ca

Re: how to close a comet request outside of an event?

2007-04-26 Thread Rémy Maucherat
On 4/26/07, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote: I don't understand why the client does not get an immediate -1 (EOF) on the read() as soon as I do this. The socket itself does not need to be closed, but the output stream close should flush the output stream and call shutdownOutput() on

Re: how to close a comet request outside of an event?

2007-04-26 Thread Sebastiaan van Erk
roduce your defect. Praveen -Original Message- From: Sebastiaan van Erk [mailto:[EMAIL PROTECTED] Sent: Thursday, April 26, 2007 2:07 PM To: Tomcat Users List Subject: how to close a comet request outside of an event? Hi, I the following Comet question; due to a server event (not a co

Re: how to close a comet request outside of an event?

2007-04-26 Thread Filip Hanik - Dev Lists
p://issues.apache.org/bugzilla/show_bug.cgi?id=42198 Also, check with the trunk to make sure you're able to reproduce your defect. Praveen -Original Message- From: Sebastiaan van Erk [mailto:[EMAIL PROTECTED] Sent: Thursday, April 26, 2007 2:07 PM To: Tomcat Users List Subject

Re: how to close a comet request outside of an event?

2007-04-26 Thread Sebastiaan van Erk
Erk [mailto:[EMAIL PROTECTED] Sent: Thursday, April 26, 2007 2:07 PM To: Tomcat Users List Subject: how to close a comet request outside of an event? Hi, I the following Comet question; due to a server event (not a comet event), I want to write some data to a client request and finish t

RE: how to close a comet request outside of an event?

2007-04-26 Thread Praveen Balaji
ROTECTED] Sent: Thursday, April 26, 2007 2:07 PM To: Tomcat Users List Subject: how to close a comet request outside of an event? Hi, I the following Comet question; due to a server event (not a comet event), I want to write some data to a client request and finish the request. Currently I wri

how to close a comet request outside of an event?

2007-04-26 Thread Sebastiaan van Erk
Hi, I the following Comet question; due to a server event (not a comet event), I want to write some data to a client request and finish the request. Currently I write the data and then call OutputStream.close() on the response output stream. This seems to work, except that it takes a long tim