Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Real-Time Web-Chat with Perl

by Juerd (Abbot)
on Mar 16, 2002 at 18:09 UTC ( #152207=note: print w/replies, xml ) Need Help??


in reply to Real-Time Web-Chat with Perl

How could I realize to "stream" the output to the client without refreshing any frame? I tried using a NPH-Script by setting the special Variable $| = 1; but that doesn't seemed to do the trick.

Most browsers start rendering after they have received 512 bytes.
A while ago, I created a web-chat that connects to IRC using POE::Component::IRC. (It's in use (as far as I know) on FellaX.net and Rhizomatic.net). Only Konqueror really needs the page to load completely, so it doesn't work in that browser. It does however work perfectly in Netscape 4, MSIE, Mozilla, Opera and many others.

Example (#foo on irc.convolution): http://webchat.convolution.nl/
Download: http://webchat.convolution.nl/chataddict.tar.gz

Warning: I coded this a long time ago, and it's coded quite badly.

The important piece of code is:

print '<!--', '*'x512, '-->'
This is quite embarrassing :)

HTH </code>

U28geW91IGNhbiBhbGwgcm90MTMgY
W5kIHBhY2soKS4gQnV0IGRvIHlvdS
ByZWNvZ25pc2UgQmFzZTY0IHdoZW4
geW91IHNlZSBpdD8gIC0tIEp1ZXJk

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://152207]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2022-12-07 00:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?