|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
I have a chat script that I'd like to add a "streaming" mode to. I came across the following code which supposedly does this, but I can't seem to get it to work:
______________________________________________ use CGI qw( URLush -nph); $| = 1; print multipart_init(-boundary=>'----'); print multipart_start(-type=>'text/html'); while (1) { print "HTML goes here..."; sleep 1; } print multipart_end; ______________________________________________ Is there anyone who'd be willing to look at the chat script and help me out with this? Thanks, Charles holomax@xmail.com |
|
#2
|
|||
|
|||
|
Take a look at the no-parsed-header docs in the CGI.pm perldoc page. Run
perldoc CGI then jump to "USING NPH SCRIPTS" and read everything below that, and the part on server push (which is what you're looking to do). How it'll all work depends on your webserver, so you'll need to read up the docs on your server about NPH scripts. I've never used NPH mode before, so beyond that I can't really help. Good luck. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Streaming Chat... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|