Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

Re: COMET - Delays in output

FelixG

2007-07-30

Replies:


I'm testing in Eclipse/WinXP locally and on a solaris8 machine over a local
network. The delay
is occuring on both Tomcats.


Sebastiaan van Erk wrote:
>
> What kind of environment are you testing in? Does the servlet run on
> your local development machine or over the network. Are there possibly
> transparent proxies between the two endpoints? You could try testing
> with network tools such as netcat to debug what's happening.
>
> Regards,
> Sebastiaan
>
> 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();
>> }
>> ...
>>
>> 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@(protected)
> To unsubscribe, e-mail: users-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>
>
>

--
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.