fastcgi++
Classes | Namespaces | Typedefs | Enumerations | Functions | Variables
protocol.hpp File Reference

Defines FastCGI protocol. More...

#include <fastcgi++/config.h>
#include <map>
#include <string>
#include <exception>
#include <stdint.h>
#include <boost/shared_array.hpp>
#include <fastcgi++/message.hpp>
#include <fastcgi++/exceptions.hpp>

Go to the source code of this file.

Classes

struct  Fastcgipp::Protocol::FullId
 A full ID value for a FastCGI request. More...
class  Fastcgipp::Protocol::Header
 Data structure used as the header for FastCGI records. More...
class  Fastcgipp::Protocol::BeginRequest
 Data structure used as the body for FastCGI records with a RecordType of BEGIN_REQUEST. More...
class  Fastcgipp::Protocol::UnknownType
 Data structure used as the body for FastCGI records with a RecordType of UNKNOWN_TYPE. More...
class  Fastcgipp::Protocol::EndRequest
 Data structure used as the body for FastCGI records with a RecordType of END_REQUEST. More...
struct  Fastcgipp::Protocol::ManagementReply< NAMELENGTH, VALUELENGTH, PADDINGLENGTH >
 Used for the reply of FastCGI management records of type GET_VALUES. More...

Namespaces

namespace  Fastcgipp
 Topmost namespace for the fastcgi++ library.
namespace  Fastcgipp::Protocol
 Defines aspects of the FastCGI Protocol.

Typedefs

typedef uint16_t Fastcgipp::Protocol::RequestId
 The request ID of a FastCGI request.

Enumerations

enum  Fastcgipp::Protocol::RecordType {
  Fastcgipp::Protocol::BEGIN_REQUEST = 1, Fastcgipp::Protocol::ABORT_REQUEST = 2, Fastcgipp::Protocol::END_REQUEST = 3, Fastcgipp::Protocol::PARAMS = 4,
  Fastcgipp::Protocol::IN = 5, Fastcgipp::Protocol::OUT = 6, Fastcgipp::Protocol::ERR = 7, Fastcgipp::Protocol::DATA = 8,
  Fastcgipp::Protocol::GET_VALUES = 9, Fastcgipp::Protocol::GET_VALUES_RESULT = 10, Fastcgipp::Protocol::UNKNOWN_TYPE = 11
}
 Defines the types of records within the FastCGI protocol. More...
enum  Fastcgipp::Protocol::Role { Fastcgipp::Protocol::RESPONDER = 1, Fastcgipp::Protocol::AUTHORIZER = 2, Fastcgipp::Protocol::FILTER = 3 }
 Defines the possible roles a FastCGI application may play. More...
enum  Fastcgipp::Protocol::ProtocolStatus { Fastcgipp::Protocol::REQUEST_COMPLETE = 0, Fastcgipp::Protocol::CANT_MPX_CONN = 1, Fastcgipp::Protocol::OVERLOADED = 2, Fastcgipp::Protocol::UNKNOWN_ROLE = 3 }
 Possible statuses a request may declare when complete. More...

Functions

bool Fastcgipp::Protocol::operator> (const FullId &x, const FullId &y)
 Compare between two FullId variables.
bool Fastcgipp::Protocol::operator< (const FullId &x, const FullId &y)
 Compare between two FullId variables.
bool Fastcgipp::Protocol::operator== (const FullId &x, const FullId &y)
 Compare between two FullId variables.
template<class T >
Fastcgipp::Protocol::readBigEndian (T value)
 Read in a big endian value.
void Fastcgipp::Protocol::processParamHeader (const char *data, size_t dataSize, const char *&name, size_t &nameSize, const char *&value, size_t &valueSize)
 Process the body of a FastCGI parameter record.

Variables

const char Fastcgipp::version [] = PACKAGE_VERSION
 Defines the fastcgi++ version.
const char * Fastcgipp::Protocol::recordTypeLabels [] = { "INVALID", "BEGIN_REQUEST", "ABORT_REQUEST", "END_REQUEST", "PARAMS", "IN", "OUT", "ERR", "DATA", "GET_VALUES", "GET_VALUES_RESULT", "UNKNOWN_TYPE" }
 Defines text labels for the RecordType values.
const int Fastcgipp::Protocol::version = 1
 The version of the FastCGI protocol that this adheres to.
const int Fastcgipp::Protocol::chunkSize = 8
 All FastCGI records will be a multiple of this many bytes.
ManagementReply< 14, 2, 8 > Fastcgipp::Protocol::maxConnsReply
 Reply record that will be sent when asked the maximum allowed file descriptors open at a time.
ManagementReply< 13, 2, 1 > Fastcgipp::Protocol::maxReqsReply
 Reply record that will be sent when asked the maximum allowed requests at a time.
ManagementReply< 15, 1, 8 > Fastcgipp::Protocol::mpxsConnsReply
 Reply record that will be sent when asked if requests can be multiplexed over a single connections.

Detailed Description

Defines FastCGI protocol.

Definition in file protocol.hpp.