mikroSDK Reference Manual
mqtt_sn_client_transport.h
Go to the documentation of this file.
1
31#ifndef _MQTT_SN_CLIENT_TRANSPORT_H
32#define _MQTT_SN_CLIENT_TRANSPORT_H
33
34//Dependencies
35#include "core/net.h"
37
38//C++ guard
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43//MQTT-SN related functions
44error_t mqttSnClientOpenConnection(MqttSnClientContext *context, bool_t secure);
45error_t mqttSnClientEstablishConnection(MqttSnClientContext *context);
46error_t mqttSnClientShutdownConnection(MqttSnClientContext *context);
47void mqttSnClientCloseConnection(MqttSnClientContext *context);
48
49error_t mqttSnClientBroadcastDatagram(MqttSnClientContext *context,
50 const IpAddr *destIpAddr, uint16_t destPort, const void *data,
51 size_t length);
52
53error_t mqttSnClientSendDatagram(MqttSnClientContext *context,
54 const void *data, size_t length);
55
56error_t mqttSnClientReceiveDatagram(MqttSnClientContext *context,
57 IpAddr *srcIpAddr, uint16_t *srcPort, void *data, size_t size,
58 size_t *received, systime_t timeout);
59
60//C++ guard
61#ifdef __cplusplus
62}
63#endif
64
65#endif
error_t
Error codes.
Definition error.h:43
MQTT-SN client.
TCP/IP stack core.
uint32_t systime_t
System time.
Definition os_port_none.h:90
IP network address.
Definition ip.h:72