Transport protocol abstraction layer. More...
Go to the source code of this file.
| Functions | |
| error_t | coapClientOpenConnection (CoapClientContext *context) | 
| Open network connection.  More... | |
| error_t | coapClientEstablishConnection (CoapClientContext *context, const IpAddr *serverIpAddr, uint16_t serverPort) | 
| Establish network connection.  More... | |
| error_t | coapClientShutdownConnection (CoapClientContext *context) | 
| Shutdown network connection.  More... | |
| void | coapClientCloseConnection (CoapClientContext *context) | 
| Close network connection.  More... | |
| error_t | coapClientSendDatagram (CoapClientContext *context, const void *data, size_t length) | 
| Send a datagram.  More... | |
| error_t | coapClientReceiveDatagram (CoapClientContext *context, void *data, size_t size, size_t *received) | 
| Receive a datagram.  More... | |
| error_t | coapClientWaitForDatagram (CoapClientContext *context, systime_t timeout) | 
| Wait for incoming datagrams.  More... | |
Detailed Description
Transport protocol abstraction layer.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2025 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.5.4
Definition in file coap_client_transport.h.
Function Documentation
◆ coapClientCloseConnection()
| void coapClientCloseConnection | ( | CoapClientContext * | context | ) | 
Close network connection.
- Parameters
- 
  [in] context Pointer to the CoAP client context 
Definition at line 205 of file coap_client_transport.c.
◆ coapClientEstablishConnection()
| error_t coapClientEstablishConnection | ( | CoapClientContext * | context, | 
| const IpAddr * | serverIpAddr, | ||
| uint16_t | serverPort | ||
| ) | 
Establish network connection.
- Parameters
- 
  [in] context Pointer to the CoAP client context [in] serverIpAddr IP address of the CoAP server [in] serverPort UDP port number 
- Returns
- Error code
Definition at line 139 of file coap_client_transport.c.
◆ coapClientOpenConnection()
| error_t coapClientOpenConnection | ( | CoapClientContext * | context | ) | 
Open network connection.
- Parameters
- 
  [in] context Pointer to the CoAP client context 
- Returns
- Error code
Definition at line 50 of file coap_client_transport.c.
◆ coapClientReceiveDatagram()
| error_t coapClientReceiveDatagram | ( | CoapClientContext * | context, | 
| void * | data, | ||
| size_t | size, | ||
| size_t * | received | ||
| ) | 
Receive a datagram.
- Parameters
- 
  [in] context Pointer to the CoAP client context [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 
- Returns
- Error code
Definition at line 273 of file coap_client_transport.c.
◆ coapClientSendDatagram()
| error_t coapClientSendDatagram | ( | CoapClientContext * | context, | 
| const void * | data, | ||
| size_t | length | ||
| ) | 
Send a datagram.
- Parameters
- 
  [in] context Pointer to the CoAP 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 239 of file coap_client_transport.c.
◆ coapClientShutdownConnection()
| error_t coapClientShutdownConnection | ( | CoapClientContext * | context | ) | 
Shutdown network connection.
- Parameters
- 
  [in] context Pointer to the CoAP client context 
- Returns
- Error code
Definition at line 179 of file coap_client_transport.c.
◆ coapClientWaitForDatagram()
| error_t coapClientWaitForDatagram | ( | CoapClientContext * | context, | 
| systime_t | timeout | ||
| ) | 
Wait for incoming datagrams.
- Parameters
- 
  [in] context Pointer to the CoAP client context [in] timeout Maximum time to wait before returning 
- Returns
- Error code
Definition at line 308 of file coap_client_transport.c.
