Used to create payloads for AMPS composite messages, which are messages with a number of parts where each part is a complete message of a specific message type.
More...
#include <CompositeMessageBuilder.hpp>
Used to create payloads for AMPS composite messages, which are messages with a number of parts where each part is a complete message of a specific message type.
For example, a composite message type of "composite-json-binary" may be declared on the server that combines a set of JSON headers with an opaque binary payload. CompositeMessageBuilder makes it easy to assemble this payload.
AMPS::CompositeMessageBuilder::CompositeMessageBuilder |
( |
size_t |
initialCapacity_ = DEFAULT_INITIAL_CAPACITY | ) |
|
|
inline |
Create a new, empty CompositeMessageBuilder.
- Parameters
-
initialCapacity_ | The initial capacity (bytes) for this builder. |
Appends a message part to this object.
- Parameters
-
- Returns
- this object.
Appends a message part to this object.
- Parameters
-
data_ | The data to append. |
length_ | The length of the data to append. |
- Returns
- this object.
Clears this object.
Does not resize or free internal buffer.
- Returns
- this object.
const char * AMPS::CompositeMessageBuilder::data |
( |
void |
| ) |
const |
|
inline |
Returns the composite message's data.
- Returns
- a pointer to the beginning of the composite message data.
size_t AMPS::CompositeMessageBuilder::length |
( |
void |
| ) |
const |
|
inline |
Returns the length of the composite message's data.
- Returns
- the length in bytes of the data comprising this message.
The documentation for this class was generated from the following file: