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
9
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
26
38typedef int (*infuse_coap_data_cb)(uint32_t offset, const uint8_t *data, uint16_t data_len,
39 void *user_context);
40
57int infuse_coap_download(int socket, const char *resource, size_t file_size,
58 infuse_coap_data_cb data_cb, void *user_context, uint8_t *working_mem,
59 size_t working_size, uint16_t block_size, int timeout_ms);
60
64
65#ifdef __cplusplus
66}
67#endif
68
69#endif /* INFUSE_SDK_INCLUDE_INFUSE_NET_COAP_H_ */
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:38
int infuse_coap_download(int socket, const char *resource, size_t file_size, infuse_coap_data_cb data_cb, void *user_context, uint8_t *working_mem, size_t working_size, uint16_t block_size, int timeout_ms)
Download a file over COAP from an existing socket.