You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Erik Bruchez <Er...@iname.com> on 1999/12/13 01:43:02 UTC
Socket and flush
Hi all,
I'm trying to do some kind of server push with Tomcat
(multipart/x-mixed-replace or multipart/mixed). After every part, I do
a flush on the OutputStream. I verified that the flush worked up to
doWrite() in org.apache.tomcat.service.http.HttpResponseAdapter. This
does an actual write on the socket.getOutputStream(). However the
client (Netscape, or telnet) doesn't seem to get any data at that
point. Is it that the socket have its own buffering? Is there a way to
force it to send the data? Maybe I am simply missing something.
The same type of code works with a 10-line cgi script written in sh.
Any help appreciated!
-Erik
Re: Socket and flush
Posted by Jason Hunter <jh...@acm.org>.
Erik Bruchez wrote:
>
> Hi all,
>
> I'm trying to do some kind of server push with Tomcat
> (multipart/x-mixed-replace or multipart/mixed).
You might want to try com.oreilly.servlet.MultipartResponse, found at
http://www.servlets.com. If it works, there's likely a bug in your
code. If it fails, then tomcat would seem to have regressed because it
used to work.
-jh-