[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] server push



hardin@CAM.ORG (Paul and Linda Hardin) writes:
>If ANYONE has ANY working version of a server push using MacPERL running I
>will pay hansomely for the code.

He he... you forgot to add a disclaimer to exclude *me* from the contest :-)

Basically server push using MacPerl is trivial:

 - Get the latest CGI glue (February, I think)
 - Get a recent enough version of WebStar (one that supports server push)
 - Make sure your script is called as an ACGI, not a CGI.
 - The script is identical to what you would use on other platforms, *except*
   that you have to indicate *explicitly* when you would like the push to
   happen. This is done by reading one line from STDIN (weird, isn't it?).

Thus, define a subroutine:

sub Push {
   local($ignore);

   $ignore = <STDIN>;
}

print ".... whatever ....";
&Push();

print ".... blah blah ....";
&Push();

Matthias

-----
Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
    "The key, the whole key, and nothing but the key. So help me Codd."