mikroSDK Reference Manual
mqtt_client_transport.h
Go to the documentation of this file.
1
31#ifndef _MQTT_CLIENT_TRANSPORT_H
32#define _MQTT_CLIENT_TRANSPORT_H
33
34//Dependencies
35#include "core/net.h"
36#include "mqtt/mqtt_client.h"
37
38//C++ guard
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43//MQTT client related functions
44error_t mqttClientOpenConnection(MqttClientContext *context);
45
46error_t mqttClientEstablishConnection(MqttClientContext *context,
47 const IpAddr *serverIpAddr, uint16_t serverPort);
48
49error_t mqttClientShutdownConnection(MqttClientContext *context);
50
51void mqttClientCloseConnection(MqttClientContext *context);
52
53error_t mqttClientSendData(MqttClientContext *context,
54 const void *data, size_t length, size_t *written, uint_t flags);
55
56error_t mqttClientReceiveData(MqttClientContext *context,
57 void *data, size_t size, size_t *received, uint_t flags);
58
59error_t mqttClientWaitForData(MqttClientContext *context, systime_t timeout);
60
61//C++ guard
62#ifdef __cplusplus
63}
64#endif
65
66#endif
error_t
Error codes.
Definition error.h:43
MQTT client.
TCP/IP stack core.
uint32_t systime_t
System time.
Definition os_port_none.h:90
IP network address.
Definition ip.h:72