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.
More...
|
byte[] | _bytes = null |
|
int | _position = 0 |
|
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.
◆ CompositeMessageBuilder() [1/2]
AMPS.Client.CompositeMessageBuilder.CompositeMessageBuilder |
( |
| ) |
|
|
inline |
◆ CompositeMessageBuilder() [2/2]
AMPS.Client.CompositeMessageBuilder.CompositeMessageBuilder |
( |
int |
initialCapacity_ | ) |
|
|
inline |
Create a new empty CompositeMessageBuilder.
- Parameters
-
initialCapacity_ | The default capacity in bytes for the serialized representation of a message. Ideal value is total message size in bytes + ( 4 * number of message parts). |
◆ append() [1/2]
Appends a message part to this object.
- Parameters
-
data_ | The bytes of the data to append. |
offset_ | The offset in data_ where your data begins. |
length_ | The length of your data. |
- Returns
- this object
◆ append() [2/2]
Appends a message part to this object.
- Parameters
-
- Returns
- this object
◆ clear()
Clears this object. Does not release or resize internal buffer.
- Returns
- this object
◆ setField()
void AMPS.Client.CompositeMessageBuilder.setField |
( |
Field |
field_ | ) |
|
|
inline |
Sets a Field with the contents of this object.
- Parameters
-
The documentation for this class was generated from the following file:
- AMPS.Client/CompositeMessageBuilder.cs