fastcgi++
|
Used for the reply of FastCGI management records of type GET_VALUES. More...
#include <protocol.hpp>
Public Member Functions | |
ManagementReply (const char *name_, const char *value_) | |
Construct the record based on the name data and value data. |
Private Attributes | |
Header | header |
Management records header. | |
uint8_t | nameLength |
Length in bytes of name. | |
uint8_t | valueLength |
Length in bytes of value. | |
uint8_t | name [NAMELENGTH] |
Name data. | |
uint8_t | value [VALUELENGTH] |
Value data. | |
uint8_t | padding [PADDINGLENGTH] |
Padding data. |
Used for the reply of FastCGI management records of type GET_VALUES.
This class template is an efficient tool for replying to GET_VALUES management records. The structure represents a complete record (body+header) of a name-value pair to be sent as a reply to a management value query. The templating allows the structure to be exactly the size that is needed so it can be casted to raw data and transmitted as is. Note that the name and value lengths are left as single bytes so they are limited in range from 0-127.
NAMELENGTH | Length of name in bytes (0-127). Null terminator not included. |
VALUELENGTH | Length of value in bytes (0-127). Null terminator not included. |
PADDINGLENGTH | Length of padding at the end of the record. This is needed to keep the record size a multiple of chunkSize. |
Definition at line 379 of file protocol.hpp.
|
inline |
Construct the record based on the name data and value data.
A full record is constructed from the name-value data. After construction the structure can be casted to raw data and transmitted as is. The size of the data arrays pointed to by name_ and value_ are assumed to correspond with the NAMELENGTH and PADDINGLENGTH template parameters passed to the class.
[in] | name_ | Pointer to name data |
[in] | value_ | Pointer to value data |
Definition at line 406 of file protocol.hpp.
References Fastcgipp::Protocol::GET_VALUES_RESULT, Fastcgipp::Protocol::ManagementReply< NAMELENGTH, VALUELENGTH, PADDINGLENGTH >::header, Fastcgipp::Protocol::ManagementReply< NAMELENGTH, VALUELENGTH, PADDINGLENGTH >::name, Fastcgipp::Protocol::Header::setContentLength(), Fastcgipp::Protocol::Header::setPaddingLength(), Fastcgipp::Protocol::Header::setRequestId(), Fastcgipp::Protocol::Header::setType(), Fastcgipp::Protocol::Header::setVersion(), Fastcgipp::Protocol::ManagementReply< NAMELENGTH, VALUELENGTH, PADDINGLENGTH >::value, and Fastcgipp::Protocol::version.
|
private |
Management records header.
Definition at line 383 of file protocol.hpp.
Referenced by Fastcgipp::Protocol::ManagementReply< NAMELENGTH, VALUELENGTH, PADDINGLENGTH >::ManagementReply().
|
private |
Name data.
Definition at line 389 of file protocol.hpp.
Referenced by Fastcgipp::Protocol::ManagementReply< NAMELENGTH, VALUELENGTH, PADDINGLENGTH >::ManagementReply().
|
private |
Length in bytes of name.
Definition at line 385 of file protocol.hpp.
|
private |
Padding data.
Definition at line 393 of file protocol.hpp.
|
private |
Value data.
Definition at line 391 of file protocol.hpp.
Referenced by Fastcgipp::Protocol::ManagementReply< NAMELENGTH, VALUELENGTH, PADDINGLENGTH >::ManagementReply().
|
private |
Length in bytes of value.
Definition at line 387 of file protocol.hpp.