[ic] Trouble with Document->send()

Joachim Leidinger jojo@blackpoint.de
Sun, 06 May 2001 21:51:30 +0200


Mike Heins wrote:
> 
> Quoting Joachim Leidinger (jojo@blackpoint.de):
> > Hi list,
> >
> > i try
> >
> > [loop arg="1 2 3" send=1]
> > [perl]
> >      my $out = " ";
> >      $Document->hot(1);
> >      my $i = 0;
> >      for ($i = 1; $i <= 10; $i++)
> >      {
> >      $out .= " $i ";
> >      select(undef,undef,undef,1.000);
> >      }
> >      $out .= "<br> Next process <BR> ";
> >      $Document->send($out); # flush buffer
> > return '';
> > [/perl]
> > [/loop]
> >
> > and i want to display
> >
> > 1 2 3 4 5 6 7 8 9 10
> > Next process
> >
> > three times immediately every 10 seconds. But i get
> >
> > 1 2 3 4 5 6 7 8 9 10
> > Next process
> > 1 2 3 4 5 6 7 8 9 10
> > Next process
> > 1 2 3 4 5 6 7 8 9 10
> > Next process
> >
> > *after* 30 seconds.
> >
> > Why is
> >
> >  $Document->send();             # Send write buffer array to output,
> > done
> >                                 # automatically upon end of ASP, clears
> > buffer
> >                                 # and invalidates $Document->header()
> >  $Document->hot(1);             # Cause writes to send immediately
> >
> > not working?
> 
> Because there is a buffer that needs to fill up via the vlink/tlink
> program. One way to fill it is to send 1024 characters of whitespace at
> the end of what you want to send.

Filling the rest of the empty buffer with "a" make the job! Filling the
rest of the empty buffer with a whitespace make not the job! It make the
job only, if I fill the buffer with more than 1024 whitespace. What is
the cause?

 
> Also, your HTTP server may have ideas about what to do with output when
> it is not in NPH mode.

I was searching the for that via the search engine like www.google.com
and so on. But I'm unable to find the right informations. Can someone
point me to the right direction? URL?

Thank you a lot!

Joachim

-- 
-------------<BPA FreeBsd>----------------------------------------------
Hans-Joachim Leidinger          black point arts Internet Solutions GmbH
email: jojo@blackpoint.de       FAX  : +49 0209-398265
http://www.bpaserver.net