Re: Apache plug-in connecting to a Cocoa application?
Re: Apache plug-in connecting to a Cocoa application?
- Subject: Re: Apache plug-in connecting to a Cocoa application?
- From: Deirdre Saoirse Moen <email@hidden>
- Date: Sun, 10 Jun 2001 11:25:03 -0700
I'd like to connect my Cocoa app to the built-in web server in OSX.
Any suggestions?
Any app can be a CGI. CGIs can be written in basically any language
(and I *have* seen job reqs for Cobol web programmers...).
Whether that's an app's whole purpose in life or not is another
question. If it's a running app that you want to talk to, you can do
it via the usual unix methods ( signal to the app, talking to a port,
or via a named pipe) or, if you have support for that at both ends,
applescript. If you think pipes look good, remember that they're
unidirectional.
(A friend of mine, upon finally getting why his pipes program didn't
work, said that man pages read much better with liberal insertions of
the word "dumbass", but I digress.)
Basically, study what a CGI looks like in C. Then you splat out the
results in the stated formats (headers first, a blank line, then the
html for the result).
Sample of a simple C CGI can be found here: (among other places)
http://www.google.com/search?q=cache:4jq2XyhgBEA:monarch.papillion.ne.us/~sthomas/cgi_in_c.html+cgi+c&hl=en
--
_Deirdre Stash-o-Matic:
http://weirdre.com http://deirdre.net
"Cannot run out of time.... Is infinite time. You... are finite....
Zathrus... is finite. This... is wrong tool!" -- Zathrus