|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
CoAP TCP client API. More...
Go to the source code of this file.
Data Structures | |
| union | coap_client_tcp_event_data |
| Event data for CoAP TCP signaling events. More... | |
| struct | coap_client_tcp_option |
| Representation of extra options for the CoAP TCP client request. More... | |
| struct | coap_client_tcp_request |
| Representation of a CoAP TCP client request. More... | |
Macros | |
| #define | MAX_COAP_TCP_MSG_LEN |
| Maximum size of a CoAP TCP message. | |
Typedefs | |
| typedef void(* | coap_client_tcp_response_cb_t) (const struct coap_client_response_data *data, void *user_data) |
| Callback for CoAP TCP request. | |
| typedef int(* | coap_client_tcp_payload_cb_t) (size_t offset, const uint8_t **payload, size_t *len, bool *last_block, void *user_data) |
| Callback for providing a payload for the CoAP TCP request. | |
| typedef int(* | coap_client_tcp_socket_config_cb_t) (int fd, void *user_data) |
| Callback to configure the socket before connecting. | |
| typedef void(* | coap_client_tcp_event_cb_t) (struct coap_client_tcp *client, enum coap_client_tcp_event event, const union coap_client_tcp_event_data *data, void *user_data) |
| Callback for CoAP TCP signaling events (Release/Abort). | |
Enumerations | |
| enum | coap_client_tcp_event { COAP_CLIENT_TCP_EVENT_CSM_UPDATED , COAP_CLIENT_TCP_EVENT_PONG_RECEIVED , COAP_CLIENT_TCP_EVENT_RELEASE , COAP_CLIENT_TCP_EVENT_ABORT } |
| CoAP TCP client event types for signaling. More... | |
Functions | |
| int | coap_client_tcp_init (struct coap_client_tcp *client, const char *info) |
| Initialize the TCP CoAP client. | |
| int | coap_client_tcp_connect (struct coap_client_tcp *client, const struct net_sockaddr *addr, net_socklen_t addrlen, int proto) |
| Connect the CoAP TCP client to a server. | |
| int | coap_client_tcp_close (struct coap_client_tcp *client) |
| Close the CoAP TCP client connection. | |
| int | coap_client_tcp_req (struct coap_client_tcp *client, struct coap_client_tcp_request *req) |
| Send CoAP request over TCP. | |
| int | coap_client_tcp_csm_req (struct coap_client_tcp *client, uint32_t max_block_size, coap_client_tcp_response_cb_t cb, void *user_data) |
| Send CSM (Capabilities and Settings Message) over TCP. | |
| void | coap_client_tcp_cancel_requests (struct coap_client_tcp *client) |
| Cancel all current TCP requests. | |
| void | coap_client_tcp_cancel_and_reset_all (struct coap_client_tcp *client) |
| Cancel and fully reset all requests when changing socket. | |
| struct coap_client_tcp_option | coap_client_tcp_option_initial_block2 (struct coap_client_tcp *client) |
| Get initial Block2 option for TCP (BERT-aware). | |
| bool | coap_client_tcp_has_ongoing_exchange (struct coap_client_tcp *client) |
| Check if TCP client has ongoing exchange. | |
| int | coap_client_tcp_ping (struct coap_client_tcp *client) |
| Send a Ping signal to the server (RFC 8323). | |
| int | coap_client_tcp_release (struct coap_client_tcp *client, const char *alt_addr, uint32_t hold_off_sec) |
| Send a Release signal to the server (RFC 8323). | |
| void | coap_client_tcp_set_event_cb (struct coap_client_tcp *client, coap_client_tcp_event_cb_t cb, void *user_data) |
| Set callback for signaling events (Release/Abort). | |
CoAP TCP client API.
An API for applications to send CoAP requests over reliable transports (TCP/TLS) as specified in RFC 8323.