Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
mqtt_client_transport.c File Reference
Transport protocol abstraction layer. More...
Go to the source code of this file.
Functions | |
| error_t | mqttClientOpenConnection (MqttClientContext *context) |
| Open network connection. | |
| error_t | mqttClientEstablishConnection (MqttClientContext *context, const IpAddr *serverIpAddr, uint16_t serverPort) |
| Establish network connection. | |
| error_t | mqttClientShutdownConnection (MqttClientContext *context) |
| Shutdown network connection. | |
| void | mqttClientCloseConnection (MqttClientContext *context) |
| Close network connection. | |
| error_t | mqttClientSendData (MqttClientContext *context, const void *data, size_t length, size_t *written, uint_t flags) |
| Send data using the relevant transport protocol. | |
| error_t | mqttClientReceiveData (MqttClientContext *context, void *data, size_t size, size_t *received, uint_t flags) |
| Receive data using the relevant transport protocol. | |
| error_t | mqttClientWaitForData (MqttClientContext *context, systime_t timeout) |
| Wait for incoming data. | |
Detailed Description
Transport protocol abstraction layer.
License
Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneSSL 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:
- 1.7.6
Definition in file mqtt_client_transport.c.
Function Documentation
| void mqttClientCloseConnection | ( | MqttClientContext * | context ) |
Close network connection.
- Parameters:
-
[in] context Pointer to the MQTT client context
Definition at line 375 of file mqtt_client_transport.c.
| error_t mqttClientEstablishConnection | ( | MqttClientContext * | context, |
| const IpAddr * | serverIpAddr, | ||
| uint16_t | serverPort | ||
| ) |
Establish network connection.
- Parameters:
-
[in] context Pointer to the MQTT client context [in] serverIpAddr IP address of the MQTT server to connect to [in] serverPort TCP port number that will be used to establish the connection
- Returns:
- Error code
Definition at line 213 of file mqtt_client_transport.c.
| error_t mqttClientOpenConnection | ( | MqttClientContext * | context ) |
Open network connection.
- Parameters:
-
[in] context Pointer to the MQTT client context
- Returns:
- Error code
Definition at line 51 of file mqtt_client_transport.c.
| error_t mqttClientReceiveData | ( | MqttClientContext * | context, |
| void * | data, | ||
| size_t | size, | ||
| size_t * | received, | ||
| uint_t | flags | ||
| ) |
Receive data using the relevant transport protocol.
- Parameters:
-
[in] context Pointer to the MQTT client context [out] data Buffer into which received data will be placed [in] size Maximum number of bytes that can be received [out] received Number of bytes that have been received [in] flags Set of flags that influences the behavior of this function
- Returns:
- Error code
Definition at line 504 of file mqtt_client_transport.c.
| error_t mqttClientSendData | ( | MqttClientContext * | context, |
| const void * | data, | ||
| size_t | length, | ||
| size_t * | written, | ||
| uint_t | flags | ||
| ) |
Send data using the relevant transport protocol.
- Parameters:
-
[in] context Pointer to the MQTT client context [in] data Pointer to a buffer containing the data to be transmitted [in] length Number of bytes to be transmitted [out] written Actual number of bytes written (optional parameter) [in] flags Set of flags that influences the behavior of this function
- Returns:
- Error code
Definition at line 432 of file mqtt_client_transport.c.
| error_t mqttClientShutdownConnection | ( | MqttClientContext * | context ) |
Shutdown network connection.
- Parameters:
-
[in] context Pointer to the MQTT client context
- Returns:
- Error code
Definition at line 303 of file mqtt_client_transport.c.
| error_t mqttClientWaitForData | ( | MqttClientContext * | context, |
| systime_t | timeout | ||
| ) |
Wait for incoming data.
- Parameters:
-
[in] context Pointer to the MQTT client context [in] timeout Maximum time to wait before returning
- Returns:
- Error code
Definition at line 587 of file mqtt_client_transport.c.
Generated on Tue Jul 12 2022 17:10:21 by
1.7.2