CGI and C++: continual updates

  • Thread starter Flavio Tischhauser
  • Start date
F

Flavio Tischhauser

Hi everyone

I'm programming CGI applications in C++. My latest prog has to request lots
of information from other servers which tend to be slow from time to time.

Apache waits until the whole CGI program has finished before it starts to
send the generated page to the browser.

In Perl it is possible to send data to the browser before the script has
completed. Does anyone know a way to do such things with c++ programs?
Simply flush cout doesn't help :(

During my search i came across the following page:
http://www.linuxjournal.com/article.php?sid=4386. This demonstrated way
doesn't seem to work on modern browsers, AFAIK this was never standard and
only implemented by older Netscape browsers.


Thanks for any help / links!


best regards

Flavio Tischhauser
 
G

Gianni Mariani

Flavio said:
Hi everyone

I'm programming CGI applications in C++. My latest prog has to request lots
of information from other servers which tend to be slow from time to time.

Apache waits until the whole CGI program has finished before it starts to
send the generated page to the browser.

In Perl it is possible to send data to the browser before the script has
completed. Does anyone know a way to do such things with c++ programs?
Simply flush cout doesn't help :(

During my search i came across the following page:
http://www.linuxjournal.com/article.php?sid=4386. This demonstrated way
doesn't seem to work on modern browsers, AFAIK this was never standard and
only implemented by older Netscape browsers.


Thanks for any help / links!

You'd probably get more help from an apache group. This question is off
topic in comp.lang.c++.

Two things you gound do:

a) do a manual http request (using telnet) and check to see if you're
actually not getting anything.

b) some html can't be rendered until it's all complete, so your browser
is getting the content, it is just is unable to display it.
 
F

Flavio Tischhauser

You'd probably get more help from an apache group. This question is
off topic in comp.lang.c++.

Woops, sorry. On my way of learning CGI for C++ i got the most useful
answers from C++ boards and groups but my current problem really goes into
server specific problems.
Two things you gound do:

a) do a manual http request (using telnet) and check to see if you're
actually not getting anything.

b) some html can't be rendered until it's all complete, so your
browser is getting the content, it is just is unable to display it.

Thanks for your tips. I already tried that, my testprog only outputs simple
text which shouldn't be a problem.

Anyway, i'll try my luck in some Apache-Groups.

Have a nice weekend!


best regards

Flavio Tischhauser
 
O

one2001boy

Flavio said:
Hi everyone

I'm programming CGI applications in C++. My latest prog has to request lots
of information from other servers which tend to be slow from time to time.

Apache waits until the whole CGI program has finished before it starts to
send the generated page to the browser.

In Perl it is possible to send data to the browser before the script has
completed. Does anyone know a way to do such things with c++ programs?

You may try C++ CGI Toolkit from Softintegration, it is free and
runs across platform. However, this toolkit runs under C/C++ interpreter
Ch only. You can find more at

http://www.softintegration.com/products/toolkit/cgi/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top