Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
coap.h
Go to the documentation of this file.
1
10#ifndef INFUSE_SDK_INCLUDE_INFUSE_NET_COAP_H_
11#define INFUSE_SDK_INCLUDE_INFUSE_NET_COAP_H_
12
13#include <stdint.h>
14#include <stdlib.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
37typedef int (*infuse_coap_data_cb)(uint32_t offset, const uint8_t *data, uint16_t data_len,
38 void *user_context);
39
54int infuse_coap_download(int socket, const char *resource, infuse_coap_data_cb data_cb,
55 void *user_context, uint8_t *working_mem, size_t working_size,
56 int timeout_ms);
57
62#ifdef __cplusplus
63}
64#endif
65
66#endif /* INFUSE_SDK_INCLUDE_INFUSE_NET_COAP_H_ */
int infuse_coap_download(int socket, const char *resource, infuse_coap_data_cb data_cb, void *user_context, uint8_t *working_mem, size_t working_size, int timeout_ms)
Download a file over COAP from an existing socket.
int(* infuse_coap_data_cb)(uint32_t offset, const uint8_t *data, uint16_t data_len, void *user_context)
COAP data download callback.
Definition coap.h:37