Fastcgipp::Protocol::Header Class Reference

Data structure used as the header for FastCGI records. More...

#include <protocol.hpp>

List of all members.

Public Member Functions

void setVersion (uint8_t version_)
 Set the version field of the record header.
int getVersion () const
 Get the version field of the record header.
void setType (RecordType type_)
 Set the record type in the header.
RecordType getType () const
 Get the record type in the header.
void setRequestId (RequestId requestId_)
 Set the request ID field in the record header.
RequestId getRequestId () const
 Get the request ID field in the record header.
void setContentLength (uint16_t contentLength_)
 Set the content length field in the record header.
int getContentLength () const
 Get the content length field in the record header.
void setPaddingLength (uint8_t paddingLength_)
 Set the padding length field in the record header.
int getPaddingLength () const
 Get the padding length field in the record header.

Private Attributes

uint8_t version
 FastCGI version number.
uint8_t type
 Record type.
uint8_t requestIdB1
 Request ID most significant byte.
uint8_t requestIdB0
 Request ID least significant byte.
uint8_t contentLengthB1
 Content length most significant byte.
uint8_t contentLengthB0
 Content length least significant byte.
uint8_t paddingLength
 Length of record padding.
uint8_t reserved
 Reseved for future use and header padding.


Detailed Description

Data structure used as the header for FastCGI records.

This structure defines the header used in FastCGI records. It can be casted to and from raw 8 byte blocks of data and transmitted/received as is. The endianess and order of data is kept correct through the accessor member functions.

Definition at line 152 of file protocol.hpp.


Member Function Documentation

int Fastcgipp::Protocol::Header::getContentLength (  )  const [inline]

Get the content length field in the record header.

Returns:
The records content length

Definition at line 201 of file protocol.hpp.

References contentLengthB1, and Fastcgipp::Protocol::readBigEndian().

int Fastcgipp::Protocol::Header::getPaddingLength (  )  const [inline]

Get the padding length field in the record header.

Returns:
The records padding length

Definition at line 213 of file protocol.hpp.

References paddingLength.

RequestId Fastcgipp::Protocol::Header::getRequestId (  )  const [inline]

Get the request ID field in the record header.

Returns:
The records request ID

Definition at line 189 of file protocol.hpp.

References Fastcgipp::Protocol::readBigEndian(), and requestIdB1.

RecordType Fastcgipp::Protocol::Header::getType (  )  const [inline]

Get the record type in the header.

Returns:
Record type

Definition at line 177 of file protocol.hpp.

References type.

int Fastcgipp::Protocol::Header::getVersion (  )  const [inline]

Get the version field of the record header.

Returns:
version FastCGI protocol version number

Definition at line 165 of file protocol.hpp.

References version.

void Fastcgipp::Protocol::Header::setContentLength ( uint16_t  contentLength_  )  [inline]

Set the content length field in the record header.

Parameters:
[in] contentLength_ The records content length

Definition at line 195 of file protocol.hpp.

References contentLengthB1, and Fastcgipp::Protocol::readBigEndian().

Referenced by Fastcgipp::Protocol::ManagementReply< NAMELENGTH, VALUELENGTH, PADDINGLENGTH >::ManagementReply().

void Fastcgipp::Protocol::Header::setPaddingLength ( uint8_t  paddingLength_  )  [inline]

Set the padding length field in the record header.

Parameters:
[in] paddingLength_ The records padding length

Definition at line 207 of file protocol.hpp.

References paddingLength.

Referenced by Fastcgipp::Protocol::ManagementReply< NAMELENGTH, VALUELENGTH, PADDINGLENGTH >::ManagementReply().

void Fastcgipp::Protocol::Header::setRequestId ( RequestId  requestId_  )  [inline]

Set the request ID field in the record header.

Parameters:
[in] requestId_ The records request ID

Definition at line 183 of file protocol.hpp.

References Fastcgipp::Protocol::readBigEndian(), and requestIdB1.

Referenced by Fastcgipp::Protocol::ManagementReply< NAMELENGTH, VALUELENGTH, PADDINGLENGTH >::ManagementReply().

void Fastcgipp::Protocol::Header::setType ( RecordType  type_  )  [inline]

Set the record type in the header.

Parameters:
[in] type_ Record type

Definition at line 171 of file protocol.hpp.

References type.

Referenced by Fastcgipp::Protocol::ManagementReply< NAMELENGTH, VALUELENGTH, PADDINGLENGTH >::ManagementReply().

void Fastcgipp::Protocol::Header::setVersion ( uint8_t  version_  )  [inline]

Set the version field of the record header.

Parameters:
[in] version_ FastCGI protocol version number

Definition at line 159 of file protocol.hpp.

References version.

Referenced by Fastcgipp::Protocol::ManagementReply< NAMELENGTH, VALUELENGTH, PADDINGLENGTH >::ManagementReply().


Member Data Documentation

Content length least significant byte.

Definition at line 226 of file protocol.hpp.

Content length most significant byte.

Definition at line 224 of file protocol.hpp.

Referenced by getContentLength(), and setContentLength().

Length of record padding.

Definition at line 228 of file protocol.hpp.

Referenced by getPaddingLength(), and setPaddingLength().

Request ID least significant byte.

Definition at line 222 of file protocol.hpp.

Request ID most significant byte.

Definition at line 220 of file protocol.hpp.

Referenced by getRequestId(), and setRequestId().

Reseved for future use and header padding.

Definition at line 230 of file protocol.hpp.

Record type.

Definition at line 218 of file protocol.hpp.

Referenced by getType(), and setType().

FastCGI version number.

Definition at line 216 of file protocol.hpp.

Referenced by getVersion(), and setVersion().


The documentation for this class was generated from the following file:

Generated on Thu Dec 11 01:47:29 2008 for fastcgi++ by  doxygen 1.5.7.1