Used to retrieve individual message parts from AMPS composite messages, which are messages where the data contains a number of parts and 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. CompositeMessageParser makes it easy to retrieve the parts of a composite message from the composite message payload.
More...
Used to retrieve individual message parts from AMPS composite messages, which are messages where the data contains a number of parts and 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. CompositeMessageParser makes it easy to retrieve the parts of a composite message from the composite message payload.
◆ CompositeMessageParser() [1/3]
AMPS.Client.CompositeMessageParser.CompositeMessageParser |
( |
| ) |
|
|
inline |
◆ CompositeMessageParser() [2/3]
AMPS.Client.CompositeMessageParser.CompositeMessageParser |
( |
Field |
body_ | ) |
|
|
inline |
◆ CompositeMessageParser() [3/3]
AMPS.Client.CompositeMessageParser.CompositeMessageParser |
( |
Message |
message_ | ) |
|
|
inline |
Creates a new CompositeMessageParser and parses a message's body.
- Parameters
-
message_ | The message containing a composite body. |
◆ getPart()
Field AMPS.Client.CompositeMessageParser.getPart |
( |
int |
index_, |
|
|
Field |
field_ |
|
) |
| |
|
inline |
Returns a part from a composite message body.
- Parameters
-
index_ | The part index to retrieve (0-based index) |
field_ | The Field to update with the buffer, index, and length of this part. |
- Returns
- The field passed as field_.
◆ getString() [1/2]
String AMPS.Client.CompositeMessageParser.getString |
( |
int |
index_ | ) |
|
|
inline |
Returns a part from a composite message body.
- Parameters
-
index_ | The part index to retrieve (0-based index) |
- Returns
- The data of this body part, decoded as UTF-8.
◆ getString() [2/2]
String AMPS.Client.CompositeMessageParser.getString |
( |
int |
index_, |
|
|
Encoding |
encoding_ |
|
) |
| |
|
inline |
Returns a part from a composite message body.
- Parameters
-
index_ | The part index to retrieve (0-based index) |
encoding_ | The Encoding to decode this body with. |
- Returns
- The data of this body part.
◆ parse() [1/2]
int AMPS.Client.CompositeMessageParser.parse |
( |
Field |
body_ | ) |
|
|
inline |
Parses a composite message body.
- Parameters
-
- Returns
- The number of message parts found in body_
◆ parse() [2/2]
int AMPS.Client.CompositeMessageParser.parse |
( |
Message |
message_ | ) |
|
|
inline |
Parses a composite message.
- Parameters
-
message_ | The message with a composite body. |
- Returns
- The number of message parts found in message_
The documentation for this class was generated from the following file:
- AMPS.Client/CompositeMessageParser.cs