E-MailRelay
|
A configuration structure for GNet::LineBuffer. More...
#include <glinebuffer.h>
Public Member Functions | |
LineBufferConfig (const std::string &eol=std::string(1U,'\n'), std::size_t warn=0U, std::size_t fmin=0U, std::size_t initial_expect=0U) | |
Constructor. More... | |
const std::string & | eol () const |
Returns the end-of-line string as passed to the constructor. More... | |
std::size_t | warn () const |
Returns the warn-limit, as passed to the constructor. More... | |
std::size_t | fmin () const |
Returns the minimum fragment size, as passed to the constructor. More... | |
std::size_t | expect () const |
Returns the initial expect value, as passed to the constructor. More... | |
Static Public Member Functions | |
static LineBufferConfig | transparent () |
Convenience factory function. More... | |
static LineBufferConfig | http () |
Convenience factory function. More... | |
static LineBufferConfig | smtp () |
Convenience factory function. More... | |
static LineBufferConfig | pop () |
Convenience factory function. More... | |
static LineBufferConfig | crlf () |
Convenience factory function. More... | |
static LineBufferConfig | newline () |
Convenience factory function. More... | |
static LineBufferConfig | autodetect () |
Convenience factory function. More... | |
A configuration structure for GNet::LineBuffer.
Definition at line 324 of file glinebuffer.h.
|
explicit |
Constructor.
An empty end-of-line string detects either LF or CR-LF. The default end-of-line string is newline. A non-zero warn-limit generates a one-shot warning when breached. The fmin value can be used to prevent trivially small line fragments from being returned. This is useful for SMTP where a fragment containing a single dot character and no end-of-line can cause confusion with respect to the end-of-text marker. The initial-expect parameter is useful for defining transparent operation.
Definition at line 231 of file glinebuffer.cpp.
|
static |
Convenience factory function.
Definition at line 252 of file glinebuffer.cpp.
|
static |
Convenience factory function.
Definition at line 257 of file glinebuffer.cpp.
|
inline |
Returns the end-of-line string as passed to the constructor.
Definition at line 515 of file glinebuffer.h.
|
inline |
Returns the initial expect value, as passed to the constructor.
Definition at line 533 of file glinebuffer.h.
|
inline |
Returns the minimum fragment size, as passed to the constructor.
Definition at line 527 of file glinebuffer.h.
|
static |
Convenience factory function.
Definition at line 272 of file glinebuffer.cpp.
|
static |
Convenience factory function.
Definition at line 247 of file glinebuffer.cpp.
|
static |
Convenience factory function.
Definition at line 267 of file glinebuffer.cpp.
|
static |
Convenience factory function.
Definition at line 262 of file glinebuffer.cpp.
|
static |
Convenience factory function.
Definition at line 240 of file glinebuffer.cpp.
|
inline |
Returns the warn-limit, as passed to the constructor.
Definition at line 521 of file glinebuffer.h.