Stores the location of a message in a buffer using a start position and a size. More...
#include <messagelocation.h>
Public Member Functions | |
bool | isValid () const |
Returns whether the stored message information describes a valid message. More... | |
MessageLocation (int start=-1, int size=0, int incompletePos=-1, int incompleteSize=0) | |
Constructor, initializes by default to an invalid message. More... | |
Public Attributes | |
int | m_incompletePos |
int | m_incompleteSize |
int | m_size |
The size of the message, when less than 0 it indicates the expected message size. More... | |
int | m_startPos |
The offset of the first byte of the message or -1 if no message. More... | |
Stores the location of a message in a buffer using a start position and a size.
Definition at line 70 of file messagelocation.h.
|
inline |
Constructor, initializes by default to an invalid message.
start | The offset of the first byte of the message |
size | The size of the message |
incompletePos | The offset of the first byte of an incomplete but potentially eventually valid message |
incompleteSize | The expected size of the message at incompletePos, if that is not -1 |
Definition at line 98 of file messagelocation.h.
|
inline |
Returns whether the stored message information describes a valid message.
Definition at line 107 of file messagelocation.h.
int MessageLocation::m_incompletePos |
The offset of the first incomplete potentially eventually valid message that has been skipped to reach the first valid and complete message at m_startPos. If no valid complete message has been found (m_startPos == -1), m_incompletePos still contains the offset of the first incomplete message. invariant: m_incompletePos == -1 || m_startPos == -1 || m_incompletePos < m_startPos
Definition at line 82 of file messagelocation.h.
int MessageLocation::m_incompleteSize |
The expected size of the first incomplete potentially eventually valid message that has been skipped to reach the first valid and complete message at m_startPos. If a valid complete message has been found at a non-0 start position and m_incompletePos is not -1, m_incompleteSize will contain the expected size of the incomplete message.
Definition at line 89 of file messagelocation.h.
int MessageLocation::m_size |
The size of the message, when less than 0 it indicates the expected message size.
Definition at line 74 of file messagelocation.h.
int MessageLocation::m_startPos |
The offset of the first byte of the message or -1 if no message.
Definition at line 73 of file messagelocation.h.