| 
    Zephyr Project API
    3.4.0
    
   A Scalable Open Source RTOS 
   | 
 
Structure to describe an MQTT-SN transport. More...
#include <mqtt_sn.h>
Data Fields | |
| int(* | init )(struct mqtt_sn_transport *transport) | 
| Will be called once on client init to initialize the transport.  More... | |
| void(* | deinit )(struct mqtt_sn_transport *transport) | 
| Will be called on client deinit.  More... | |
| int(* | msg_send )(struct mqtt_sn_client *client, void *buf, size_t sz) | 
| ssize_t(* | recv )(struct mqtt_sn_client *client, void *buffer, size_t length) | 
| Will be called by the library when it wants to receive a message.  More... | |
| int(* | poll )(struct mqtt_sn_client *client) | 
| Check if incoming data is available.  More... | |
Structure to describe an MQTT-SN transport.
MQTT-SN does not require transports to be reliable or to hold a connection. Transports just need to be frame-based, so you can use UDP, ZigBee, or even a simple UART, given some kind of framing protocol is used.
| void(* mqtt_sn_transport::deinit) (struct mqtt_sn_transport *transport) | 
Will be called on client deinit.
Use this to close sockets or similar. May be NULL.
| int(* mqtt_sn_transport::init) (struct mqtt_sn_transport *transport) | 
Will be called once on client init to initialize the transport.
Use this to open sockets or similar. May be NULL.
| int(* mqtt_sn_transport::msg_send) (struct mqtt_sn_client *client, void *buf, size_t sz) | 
Will be called by the library when it wants to send a message.
| int(* mqtt_sn_transport::poll) (struct mqtt_sn_client *client) | 
Check if incoming data is available.
If poll() returns a positive number, recv must not block.
May be NULL, but recv should not block then either.
| ssize_t(* mqtt_sn_transport::recv) (struct mqtt_sn_client *client, void *buffer, size_t length) | 
Will be called by the library when it wants to receive a message.
Implementations should follow recv conventions.