Transport protocol abstraction layer. More...
Go to the source code of this file.
Functions | |
error_t | mqttSnClientOpenConnection (MqttSnClientContext *context, bool_t secure) |
Open network connection. More... | |
error_t | mqttSnClientEstablishConnection (MqttSnClientContext *context) |
Establish network connection. More... | |
error_t | mqttSnClientShutdownConnection (MqttSnClientContext *context) |
Shutdown network connection. More... | |
void | mqttSnClientCloseConnection (MqttSnClientContext *context) |
Close network connection. More... | |
error_t | mqttSnClientBroadcastDatagram (MqttSnClientContext *context, const IpAddr *destIpAddr, uint16_t destPort, const void *data, size_t length) |
Broadcast a datagram. More... | |
error_t | mqttSnClientSendDatagram (MqttSnClientContext *context, const void *data, size_t length) |
Send a datagram. More... | |
error_t | mqttSnClientReceiveDatagram (MqttSnClientContext *context, IpAddr *srcIpAddr, uint16_t *srcPort, void *data, size_t size, size_t *received, systime_t timeout) |
Receive a datagram. More... | |
Detailed Description
Transport protocol abstraction layer.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneTCP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.4.4
Definition in file mqtt_sn_client_transport.h.
Function Documentation
◆ mqttSnClientBroadcastDatagram()
error_t mqttSnClientBroadcastDatagram | ( | MqttSnClientContext * | context, |
const IpAddr * | destIpAddr, | ||
uint16_t | destPort, | ||
const void * | data, | ||
size_t | length | ||
) |
Broadcast a datagram.
- Parameters
-
[in] context Pointer to the MQTT-SN client context [in] destIpAddr Destination IP address [in] destPort Destination port number [in] data Pointer to a buffer containing the datagram to be transmitted [in] length Length of the datagram, in bytes
- Returns
- Error code
Definition at line 240 of file mqtt_sn_client_transport.c.
◆ mqttSnClientCloseConnection()
void mqttSnClientCloseConnection | ( | MqttSnClientContext * | context | ) |
Close network connection.
- Parameters
-
[in] context Pointer to the MQTT-SN client context
Definition at line 204 of file mqtt_sn_client_transport.c.
◆ mqttSnClientEstablishConnection()
error_t mqttSnClientEstablishConnection | ( | MqttSnClientContext * | context | ) |
Establish network connection.
- Parameters
-
[in] context Pointer to the MQTT-SN client context
- Returns
- Error code
Definition at line 138 of file mqtt_sn_client_transport.c.
◆ mqttSnClientOpenConnection()
error_t mqttSnClientOpenConnection | ( | MqttSnClientContext * | context, |
bool_t | secure | ||
) |
Open network connection.
- Parameters
-
[in] context Pointer to the MQTT-SN client context [in] secure Secure/non-secure connection
- Returns
- Error code
Definition at line 51 of file mqtt_sn_client_transport.c.
◆ mqttSnClientReceiveDatagram()
error_t mqttSnClientReceiveDatagram | ( | MqttSnClientContext * | context, |
IpAddr * | srcIpAddr, | ||
uint16_t * | srcPort, | ||
void * | data, | ||
size_t | size, | ||
size_t * | received, | ||
systime_t | timeout | ||
) |
Receive a datagram.
- Parameters
-
[in] context Pointer to the MQTT-SN client context [out] srcIpAddr Source IP address [out] srcPort Source port number [out] data Buffer into which the received datagram will be placed [in] size Maximum number of bytes that can be received [out] received Number of bytes that have been received [in] timeout Maximum time to wait before returning
- Returns
- Error code
Definition at line 296 of file mqtt_sn_client_transport.c.
◆ mqttSnClientSendDatagram()
error_t mqttSnClientSendDatagram | ( | MqttSnClientContext * | context, |
const void * | data, | ||
size_t | length | ||
) |
Send a datagram.
- Parameters
-
[in] context Pointer to the MQTT-SN client context [in] data Pointer to a buffer containing the datagram to be transmitted [in] length Length of the datagram, in bytes
- Returns
- Error code
Definition at line 258 of file mqtt_sn_client_transport.c.
◆ mqttSnClientShutdownConnection()
error_t mqttSnClientShutdownConnection | ( | MqttSnClientContext * | context | ) |
Shutdown network connection.
- Parameters
-
[in] context Pointer to the MQTT-SN client context
- Returns
- Error code
Definition at line 178 of file mqtt_sn_client_transport.c.