|
Open Model Railroad Network (OpenMRN)
|
Message segmenter that keeps each packet as-is. More...
Public Member Functions | |
| ssize_t | segment_message (const void *d, size_t size) override |
| Makes a segmenting decision given more input data. | |
| void | clear () override |
| Resets internal state machine. | |
Public Attributes | |
| size_t | total_ {0} |
Message segmenter that keeps each packet as-is.
Definition at line 128 of file DirectHubGc.cxx.
|
inlineoverridevirtual |
Resets internal state machine.
The next call to segment_message() assumes no previous data present.
Implements MessageSegmenter.
Definition at line 138 of file DirectHubGc.cxx.
|
inlineoverridevirtual |
Makes a segmenting decision given more input data.
This function will be called by the input routine repeatedly with the additional payload (non-overlapping) until the function returns a non-zero response.
That response tells how many bytes long the last packet was, which must be <= the sum of the size arguments passed in. Thereafter the read flow will call clear() and call segment_message() again with the remaining partial buffer.
| data | beginning of the buffer pointing to the next unsegmented data array. |
| size | how many bytes of data are available at this address. Must be >0. |
Implements MessageSegmenter.
Definition at line 131 of file DirectHubGc.cxx.
| size_t DirectHubTrivialSegmenter::total_ {0} |
Definition at line 142 of file DirectHubGc.cxx.