Public Member Functions | |
Fcgibuf () | |
void | set (Protocol::FullId id_, Transceiver &transceiver_, Protocol::RecordType type_) |
After construction constructor. | |
virtual | ~Fcgibuf () |
void | dump (char *data, size_t size) |
Dumps raw data directly into the FastCGI protocol. | |
Private Types | |
typedef std::basic_streambuf < charT, traits >::int_type | int_type |
typedef std::basic_streambuf < charT, traits >::traits_type | traits_type |
typedef std::basic_streambuf < charT, traits >::char_type | char_type |
Private Member Functions | |
int_type | overflow (int_type c=traits_type::eof()) |
int | sync () |
std::streamsize | xsputn (const char_type *s, std::streamsize n) |
int | emptyBuffer () |
Code converts, packages and transmits all data in the stream buffer along with the dump data. | |
Private Attributes | |
char * | dumpPtr |
Pointer to the data that needs to be transmitted upon flush. | |
size_t | dumpSize |
Size of the data pointed to be dumpPtr. | |
Transceiver * | transceiver |
Transceiver object to use for transmissio. | |
char_type | buffer [buffSize] |
The buffer. | |
Protocol::FullId | id |
Complete ID associated with the request. | |
Protocol::RecordType | type |
Type of output stream (ERR or OUT). | |
Static Private Attributes | |
static const int | buffSize = 8192 |
Size of the internal stream buffer. |
This class is derived from std::basic_streambuf<charT, traits>. It acts just the same as any stream buffer does with the added feature of the dump() function.
charT | Character type (char or wchar_t) | |
traits | Character traits |
Definition at line 78 of file fcgistream.hpp.
typedef std::basic_streambuf<charT, traits>::char_type Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::char_type [private] |
Definition at line 113 of file fcgistream.hpp.
typedef std::basic_streambuf<charT, traits>::int_type Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::int_type [private] |
Definition at line 111 of file fcgistream.hpp.
typedef std::basic_streambuf<charT, traits>::traits_type Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::traits_type [private] |
Definition at line 112 of file fcgistream.hpp.
Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::Fcgibuf | ( | ) | [inline] |
Definition at line 81 of file fcgistream.hpp.
References Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::buffer, and Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::buffSize.
virtual Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::~Fcgibuf | ( | ) | [inline, virtual] |
Definition at line 98 of file fcgistream.hpp.
References Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::sync().
void Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::dump | ( | char * | data, | |
size_t | size | |||
) | [inline] |
Dumps raw data directly into the FastCGI protocol.
This function exists as a mechanism to dump raw data out the stream bypassing the stream buffer or any code conversion mechanisms. If the user has any binary data to send, this is the function to do it with.
[in] | data | Pointer to first byte of data to send |
[in] | size | Size in bytes of data to be sent |
Definition at line 108 of file fcgistream.hpp.
References Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::dumpPtr, Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::dumpSize, and Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::sync().
Referenced by Fastcgipp::Fcgistream< charT, std::char_traits< charT > >::dump().
int Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::emptyBuffer | ( | ) | [inline, private] |
Code converts, packages and transmits all data in the stream buffer along with the dump data.
Definition at line 41 of file request.cpp.
References Fastcgipp::Protocol::chunkSize, Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::dumpPtr, Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::dumpSize, Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::id, Fastcgipp::Transceiver::requestWrite(), Fastcgipp::Transceiver::secureWrite(), Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::transceiver, Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::type, and Fastcgipp::Protocol::version.
Referenced by Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::sync(), and Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::xsputn().
int_type Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::overflow | ( | int_type | c = traits_type::eof() |
) | [private] |
void Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::set | ( | Protocol::FullId | id_, | |
Transceiver & | transceiver_, | |||
Protocol::RecordType | type_ | |||
) | [inline] |
After construction constructor.
Sets FastCGI related member data necessary for operation of the stream buffer.
[in] | id_ | Complete ID associated with the request |
[in] | transceiver_ | Transceiver object to use for transmission |
[in] | type_ | Type of output stream (ERR or OUT) |
Definition at line 91 of file fcgistream.hpp.
References Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::transceiver, and Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::type.
Referenced by Fastcgipp::Fcgistream< charT, std::char_traits< charT > >::set().
int Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::sync | ( | ) | [inline, private] |
Definition at line 117 of file fcgistream.hpp.
References Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::emptyBuffer().
Referenced by Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::dump(), and Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::~Fcgibuf().
std::streamsize Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::xsputn | ( | const char_type * | s, | |
std::streamsize | n | |||
) | [inline, private] |
Definition at line 107 of file request.cpp.
References Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::emptyBuffer().
char_type Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::buffer[buffSize] [private] |
The buffer.
Definition at line 133 of file fcgistream.hpp.
Referenced by Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::Fcgibuf().
const int Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::buffSize = 8192 [static, private] |
Size of the internal stream buffer.
Definition at line 131 of file fcgistream.hpp.
Referenced by Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::Fcgibuf().
char* Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::dumpPtr [private] |
Pointer to the data that needs to be transmitted upon flush.
Definition at line 122 of file fcgistream.hpp.
Referenced by Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::dump(), and Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::emptyBuffer().
size_t Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::dumpSize [private] |
Size of the data pointed to be dumpPtr.
Definition at line 124 of file fcgistream.hpp.
Referenced by Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::dump(), and Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::emptyBuffer().
Protocol::FullId Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::id [private] |
Complete ID associated with the request.
Definition at line 135 of file fcgistream.hpp.
Referenced by Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::emptyBuffer().
Transceiver* Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::transceiver [private] |
Transceiver object to use for transmissio.
Definition at line 129 of file fcgistream.hpp.
Referenced by Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::emptyBuffer(), and Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::set().
Protocol::RecordType Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::type [private] |
Type of output stream (ERR or OUT).
Definition at line 138 of file fcgistream.hpp.
Referenced by Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::emptyBuffer(), and Fastcgipp::Fcgistream< charT, traits >::Fcgibuf::set().