fastcgi++
Public Member Functions | Private Attributes
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 168 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 217 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 229 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 205 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 193 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 181 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 211 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 223 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 199 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 187 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 175 of file protocol.hpp.

References version.

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


Member Data Documentation

uint8_t Fastcgipp::Protocol::Header::contentLengthB0
private

Content length least significant byte.

Definition at line 242 of file protocol.hpp.

uint8_t Fastcgipp::Protocol::Header::contentLengthB1
private

Content length most significant byte.

Definition at line 240 of file protocol.hpp.

Referenced by getContentLength(), and setContentLength().

uint8_t Fastcgipp::Protocol::Header::paddingLength
private

Length of record padding.

Definition at line 244 of file protocol.hpp.

Referenced by getPaddingLength(), and setPaddingLength().

uint8_t Fastcgipp::Protocol::Header::requestIdB0
private

Request ID least significant byte.

Definition at line 238 of file protocol.hpp.

uint8_t Fastcgipp::Protocol::Header::requestIdB1
private

Request ID most significant byte.

Definition at line 236 of file protocol.hpp.

Referenced by getRequestId(), and setRequestId().

uint8_t Fastcgipp::Protocol::Header::reserved
private

Reseved for future use and header padding.

Definition at line 246 of file protocol.hpp.

uint8_t Fastcgipp::Protocol::Header::type
private

Record type.

Definition at line 234 of file protocol.hpp.

Referenced by getType(), and setType().

uint8_t Fastcgipp::Protocol::Header::version
private

FastCGI version number.

Definition at line 232 of file protocol.hpp.

Referenced by getVersion(), and setVersion().


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