-
Notifications
You must be signed in to change notification settings - Fork 94
fastcgi++: A C++ FastCGI and Web development platform:
License
eddic/fastcgipp
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
fastcgi++ _VERSION_ _DATE_ Eddie Carle Introduction The fastcgi++ library started out as a C++ alternative to the official FastCGI developers kit. Although the official developers kit provided some degree of C++ interface, it was very limited. The goal of this project was to provide a framework that offered all the facilities that the C++ language has to offer. Over time the scope broadened to the point that it became more than just a simple protocol library, but a platform to develop web application under C++. To the dismay of many, this library has zero support for the old CGI protocol. The consensus was that if one were to be developing web applications under C++, efficient memory management and CPU usage would be a top priority, not CGI compatibility. Effective management of simultaneous requests without the need for multiple threads is something that fastcgi++ does best. Session data is organized into meaningful data types as opposed to a series of text strings. Internationalization and Unicode support is another top priority. The library is templated to allow internal wide character use for efficient text processing while code converting down to utf-8 upon transmission to the client. Features * Support for multiple locales and characters sets including wide Unicode and utf-8 * Internally manages simultaneous requests instead of leaving that to the user * Establishes session data into usable data structures * Implements a task manager that can not only easily communicate outside the library, but with separate threads * Provides a familiar io interface by implementing it through STL iostreams * Complete compliance with FastCGI protocol version 1 Overview The fastcgi++ library is built around three classes. Fastcgipp::Manager handles all task and request management along with the communication inside and outside the library. Fastcgipp::Transceiver handles all low level socket io and maintains send/receive buffers. Fastcgipp::Request is designed to handle the individual requests themselves. The aspects of the FastCGI protocol itself are defined in the Fastcgipp::Protocol namespace. The Fastcgipp::Request class is a pure virtual class. The class, as is, establishes and parses session data. Once complete it looks to user defined virtual functions for actually generating the response. A response shall be outputted by the user defined virtuals through an output stream. Once a request has control over operation it maintains it until relinquishing it. Should the user know a request will sit around waiting for data, it can return control to Fastcgipp::Manager and have a message sent back through the manager when the data is ready. The aspects of the session are build around the Fastcgipp::Http namespace. Fastcgipp::Manager basically runs an endless loop (which can be terminated through POSIX signals or a function call from another thread) that passes control to requests that have a message queued or the transceiver. It is smart enough to go into a sleep mode when there are no tasks to complete or data to receive. Fastcgipp::Transceiver's transmit half implements a cyclic buffer that can grow indefinitely to insure that operation does not halt. The send half receives full frames and passes them through Fastcgipp::Manager onto the requests. It manages all the open connections and polls them for incoming data. Dependencies * Boost C++ Libraries >1.35.0 * Posix compliant OS (socket stuff)
About
fastcgi++: A C++ FastCGI and Web development platform:
Topics
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published