coreMQTT v2.3.0
MQTT 3.1.1 Client Library
 
Loading...
Searching...
No Matches
transport_interface.h File Reference

Transport interface definitions to send and receive data over the network. More...

#include <stdint.h>
#include <stddef.h>

Go to the source code of this file.

Data Structures

struct  TransportOutVector_t
 Transport vector structure for sending multiple messages. More...
 
struct  TransportInterface_t
 The transport layer interface. More...
 

Typedefs

typedef struct NetworkContext NetworkContext_t
 The NetworkContext is an incomplete type. An implementation of this interface must define struct NetworkContext for the system requirements. This context is passed into the network interface functions.
 
typedef int32_t(* TransportRecv_t) (NetworkContext_t *pNetworkContext, void *pBuffer, size_t bytesToRecv)
 Transport interface for receiving data on the network.
 
typedef int32_t(* TransportSend_t) (NetworkContext_t *pNetworkContext, const void *pBuffer, size_t bytesToSend)
 Transport interface for sending data over the network.
 
typedef int32_t(* TransportWritev_t) (NetworkContext_t *pNetworkContext, TransportOutVector_t *pIoVec, size_t ioVecCount)
 Transport interface function for "vectored" / scatter-gather based writes. This function is expected to iterate over the list of vectors pIoVec having ioVecCount entries containing portions of one MQTT message at a maximum. If the proper functionality is available, then the data in the list should be copied to the underlying TCP buffer before flushing the buffer. Implementing it in this fashion will lead to sending of fewer TCP packets for all the values in the list.
 

Detailed Description

Transport interface definitions to send and receive data over the network.