main event loop
for a Sapphire/Web-generated cgi.
#include "SaRnHtml.h"
int SaProcessInputStream();
Content-type: text/html\n\nto standard out to fulfill the standard cgi requirement. It then determines which function to call based on
argv, argc
, the "QUERY_STRING" environment variable, or standard input. That function will then execute your Data Object requests. If there are HTML templates to "play", SaProcessInputStream will then read those templates and play them. If Sapphire/Web sites are found, then the site will be processed accordingly and generate "population callback" calls. If there are no templates to process, you must generate the return HTML stream. For an example of code, see SaPopulateMsgBox()
.
SaProcessInputStream();