Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > dc51c7d3f8a5588a609f484ef81504ee > files > 125

libfastcgipp-devel-1.1-2mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>fastcgi++: Main Page</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li class="current"><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>fastcgi++ Documentation</h1>
<p>
<dl class="version" compact><dt><b>Version:</b></dt><dd>1.1 </dd></dl>
<dl class="author" compact><dt><b>Author:</b></dt><dd>Eddie </dd></dl>
<dl class="date" compact><dt><b>Date:</b></dt><dd>Sept 16, 2008</dd></dl>
<a class="el" href="index.html#intro">Introduction</a> <br>
 <a class="el" href="index.html#features">Features</a> <br>
 <a class="el" href="index.html#overview">Overview</a> <br>
 <a class="el" href="index.html#dep">Dependencies</a> <br>
 <a class="el" href="index.html#installation">Installation</a> <br>
 <a class="el" href="index.html#tutorials">Tutorials</a><h2><a class="anchor" name="intro">
Introduction</a></h2>
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.<h2><a class="anchor" name="features">
Features</a></h2>
<ul>
<li>Support for multiple locales and characters sets including wide Unicode and utf-8 </li>
<li>Internally manages simultaneous requests instead of leaving that to the user </li>
<li>Establishes session data into usable data structures </li>
<li>Implements a task manager that can not only easily communicate outside the library, but with separate threads </li>
<li>Provides a familiar io interface by implementing it through STL iostreams </li>
<li>Complete compliance with FastCGI protocol version 1</li>
</ul>
<h2><a class="anchor" name="overview">
Overview</a></h2>
The fastcgi++ library is built around three classes. <a class="el" href="classFastcgipp_1_1Manager.html" title="General task and protocol management class.">Fastcgipp::Manager</a> handles all task and request management along with the communication inside and outside the library. <a class="el" href="classFastcgipp_1_1Transceiver.html" title="Handles low level communication with &quot;the other side&quot;.">Fastcgipp::Transceiver</a> handles all low level socket io and maintains send/receive buffers. <a class="el" href="classFastcgipp_1_1Request.html" title="Request handling class">Fastcgipp::Request</a> is designed to handle the individual requests themselves. The aspects of the FastCGI protocol itself are defined in the <a class="el" href="namespaceFastcgipp_1_1Protocol.html" title="Defines aspects of the FastCGI Protocol.">Fastcgipp::Protocol</a> namespace.<p>
The <a class="el" href="classFastcgipp_1_1Request.html" title="Request handling class">Fastcgipp::Request</a> 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 <a class="el" href="classFastcgipp_1_1Manager.html" title="General task and protocol management class.">Fastcgipp::Manager</a> and have a message sent back through the manager when the data is ready. The aspects of the session are build around the <a class="el" href="namespaceFastcgipp_1_1Http.html" title="Defines classes and function relating to the http protocol.">Fastcgipp::Http</a> namespace.<p>
<a class="el" href="classFastcgipp_1_1Manager.html" title="General task and protocol management class.">Fastcgipp::Manager</a> 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.<p>
<a class="el" href="classFastcgipp_1_1Transceiver.html" title="Handles low level communication with &quot;the other side&quot;.">Fastcgipp::Transceiver</a>'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 <a class="el" href="classFastcgipp_1_1Manager.html" title="General task and protocol management class.">Fastcgipp::Manager</a> onto the requests. It manages all the open connections and polls them for incoming data.<h2><a class="anchor" name="dep">
Dependencies</a></h2>
<ul>
<li>Boost C++ Libraries &gt;1.35.0 </li>
<li>Posix compliant OS (socket stuff)</li>
</ul>
<h2><a class="anchor" name="installation">
Installation</a></h2>
The installation of fastcgi++ is pretty standard save a few quirks. The most basic installation of the library is the traditional:<p>
<code>tar -xvjf fastcgi++-1.1.tar.bz2<br>
 cd fastcgi++-1.1<br>
 make<br>
 make install</code><p>
The default prefix for installation is /usr/local. If you wanted to change it to /usr simply change <code>"make install"</code> to <code>"PREFIX=/usr make install"</code>. If you want the binary files to be run through <code>strip</code> change <code>"make"</code> to <code>"STRIP=true make"</code>.<p>
To also install the documentation into $PREFIX/share/doc/fastcgi++ with PREFIX preceded as above run this:<p>
<code>make doc-install</code><p>
If you want to build and install the examples, simply the commands below. The build the examples statically, precede make with STATIC=yes.<p>
<code>make examples<br>
 make examples-install</code><p>
The examples will by default install to $WWWROOT/fastcgipp with WWWROOT = /var/www/localhost/htdocs. To change WWWROOT, simply precede <code>"make examples-install"</code> with a definition of WWWROOT as in the prefix example above.<h2><a class="anchor" name="tutorials">
Tutorials</a></h2>
This is a collection of tutorials that should cover most aspects of the fastcgi++ library<p>
<a class="el" href="helloWorld.html">Hello World in Five Languages</a> : A simple tutorial outputting "Hello World" in five languages using UTF-32 internally and UTF-8 externally.<p>
<a class="el" href="echo.html">Echo</a> : An example of a FastCGI application that echoes all user data and sets a cookie<p>
<a class="el" href="showGnu.html">Display The Gnu</a> : A tutorial explaining how to display images and non-html data as well as setting locales<p>
<a class="el" href="timer.html">Delayed response</a> : A tutorial covering the use of the task manager and threads to have requests efficiently communicate with non-fastcgi++ data. </div>
<hr size="1"><address style="text-align: right;"><small>Generated on Tue Sep 16 15:17:46 2008 for fastcgi++ by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>