NanoCoAP Link Format helper functions. More...
NanoCoAP Link Format helper functions.
NanoCoAP Link Format (RFC 6690) helper functions
Definition in file link_format.h.
#include "net/nanocoap_sock.h"
Include dependency graph for link_format.h:Go to the source code of this file.
| typedef int(* | coap_link_format_handler_t) (char *entry, void *ctx) |
| Callback function called for each resource on the directory. More... | |
| int | nanocoap_link_format_get (nanocoap_sock_t *sock, const char *path, coap_link_format_handler_t cb, void *arg, char *dirent_buf, size_t dirent_buf_len) |
Downloads the resource behind path via blockwise GET. More... | |
| int | nanocoap_link_format_get_url (const char *url, coap_link_format_handler_t cb, void *arg, char *dirent_buf, size_t dirent_buf_len) |
Downloads the resource behind url via blockwise GET. More... | |
| typedef int(* coap_link_format_handler_t) (char *entry, void *ctx) |
Callback function called for each resource on the directory.
| [in] | entry | Resource entry from the server |
| [in] | ctx | Optional function context |
Definition at line 39 of file link_format.h.
| int nanocoap_link_format_get | ( | nanocoap_sock_t * | sock, |
| const char * | path, | ||
| coap_link_format_handler_t | cb, | ||
| void * | arg, | ||
| char * | dirent_buf, | ||
| size_t | dirent_buf_len | ||
| ) |
Downloads the resource behind path via blockwise GET.
| [in] | sock | Connection to the server |
| [in] | path | path of the resource |
| [in] | cb | Callback to execute for each resource entry |
| [in] | arg | Optional callback argument |
| [out] | dirent_buf | Response buffer |
| [in] | dirent_buf_len | Length of the response buffer |
| int nanocoap_link_format_get_url | ( | const char * | url, |
| coap_link_format_handler_t | cb, | ||
| void * | arg, | ||
| char * | dirent_buf, | ||
| size_t | dirent_buf_len | ||
| ) |
Downloads the resource behind url via blockwise GET.
| [in] | url | URL to the resource |
| [in] | cb | Callback to execute for each resource entry |
| [in] | arg | Optional callback argument |
| [out] | dirent_buf | Response buffer |
| [in] | dirent_buf_len | Length of the response buffer |