[lug] Web based streaming updates - how to get started?
Michael D. Hirsch
mhirsch at nubridges.com
Wed Jan 22 14:57:45 MST 2003
On Wednesday 22 January 2003 03:22 pm, Michael J. Hammel wrote:
> I have a project at work where I need to launch an application via a CGI
> script/program and have that application send multiple "status" updates
> back to the script/program. I've done a modest amount of web
> programming but nothing that makes the CGI program display data, get
> more data, then display the new data over the place where the last data
> was displayed. I think this is something akin to Push technology.
> Maybe not. Java is a possibility but I have no experience with Java.
> I'd prefer either a C based solution if possible, and if not, then
> perhaps Perl.
>
> Is there a C library that will take incoming HTTP requests, allow me to
> parse them (similar to CGI.pm) and then send the results back (probably
> just formatted HTML using printf's if this C program is running as a CGI
> script, I would think). And how can I get the output to refresh the
> browser with each 'status" update I get from the launched application?
The one time I did this we used the "nph" or "non parsed headers"
capability. I don't remember the exact details, but essentially your cgi
tells the web server not to put any headers on your ourput. You CGI can
then keep the connection open for a long time and keep sending new output.
A google search for "nph parsed headers" yielded lot of stuff. In a quick
scan I came up with this:
http://lists.backhand.org/pipermail/backhand-users/2002-February/000710.html
--Michael
More information about the LUG
mailing list