Reputation:
I created a fastcgi app using this (threaded) example. I like it and the interface. I have the app running and have nginx using it with no problem. Now i would like to communicate with the fastcgi applications from my own C/C++ applications. What library may I use to communicate with the app?
When i google fastcgi and C++ i get results on writing fastcgi apps in C. I dont see any code to call apps using the fastcgi interface in C. My fastcgi app is running, theres no server on this machine and i'd like to talk to it as something like nginx does.
Upvotes: 0
Views: 1052
Reputation: 27243
You basically need to implement Web server side of the FastCGI interface defined in this specification. It is biased towards writing a FastCGI application, but offers enough detail about the protocol to aid Web server side implementation, too.
See also this documentation and mod_fastcgi
sources.
Note however, that depending on your end goal, it may be a better and considerably easier solution to use a lightweight HTTP server with FastCGI support like lighttpd (see this list for more) and issue ordinary HTTP requests to the server. The latter can easily be accomplished by using an HTTP client library (see for example this site).
Upvotes: 1