![]() |
Thingstream Client Library
BLD4131-v2.13
|
Thingstream protocol implementation. More...
#include "transport_api.h"
Functions | |
ThingstreamTransport * | Thingstream_createProtocolTransport (ThingstreamTransport *inner, uint8_t *buffer, uint16_t len) |
ThingstreamTransportResult | Thingstream_Protocol_setUssdSessionDelay (ThingstreamTransport *transport, uint32_t delay) |
Thingstream protocol implementation.
ThingstreamTransport* Thingstream_createProtocolTransport | ( | ThingstreamTransport * | inner, |
uint8_t * | buffer, | ||
uint16_t | len | ||
) |
Create a thingstream protocol transport instance. This wraps MQTT-SN data in a structure identifying the payload to the server infrastructure. The caller can provide a buffer to use for this codec, allowing payload lengths larger than the underlying transport by using fragmentation and reassembly. If NULL is passed in, or the buffer length is zero, this codec will use the buffer of the inner transport, thus limiting payload length to the MTU of the transport.
inner | the underlying ThingstreamTransport instance |
buffer | a buffer to use for reassembling inner ThingstreamTransport packets |
len | the length of the provided buffer |
ThingstreamTransportResult Thingstream_Protocol_setUssdSessionDelay | ( | ThingstreamTransport * | transport, |
uint32_t | delay | ||
) |
This api allows the default time between USSD sessions to be defined. The call must happen before the call to Thingstream_Client_connect().
transport | the ThingstreamTransport instance |
delay | the delay, in milliseconds, between USSD sessions |