tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Hanik - Dev Lists <devli...@hanik.com>
Subject Re: COMET - Delays in output
Date Mon, 30 Jul 2007 16:45:38 GMT
FelixG wrote:
> Hi,
> I'm trying to implement the comet code-example from the Tomcat
> documentation,
> using Tomcat 6.0.13, Http11NioProtocol is working and my servlet is
> implementing CometProcessor.
> I am trying to write into the response's PrintWriter with this code in
> event():
>
> if (event.getEventType() == CometEvent.EventType.BEGIN) {
>   PrintWriter writer = response.getWriter();
>   writer.println("<!doctype html public \"-//w3c//dtd html 4.0
> transitional//en\">");
>   writer.println("<head><title>Chat Servlet</title></head>" +
>   "<body bgcolor=\"#FFFFFF\">" + new Date()+ "");
> writer.flush();
> }
>   
flush should push out the data for you. If not, please open a bugzilla 
item and attach the test case
http://issues.apache.org/bugzilla/enter_bug.cgi?product=Tomcat%206

Filip
> ...
>
> At this point I am experiencing a delay according to the value of the
> comet.timeout parameter
> before the data is actually arriving at the client (even though flush()
> should send it immediately).
> Could someone please point me to an explanation of this behavior?
>
> Regards,
> felix
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message