Contiki 3.x
|
CoAP module for block 1 handlingMore...
Go to the source code of this file.
Functions | |
int | coap_block1_handler (void *request, void *response, uint8_t *target, size_t *len, size_t max_len) |
Block 1 support within a coap-ressource. More... | |
CoAP module for block 1 handling
Definition in file er-coap-block1.c.
int coap_block1_handler | ( | void * | request, |
void * | response, | ||
uint8_t * | target, | ||
size_t * | len, | ||
size_t | max_len | ||
) |
Block 1 support within a coap-ressource.
This function will help you to use block 1. If target is null error handling and response configuration is active. On return value 0, the last block was recived, while on return value 1 more blocks will follow. With target, len and maxlen this function will assemble the blocks. You can find an example in: examples/er-rest-example/resources/res-b1-sep-b2.c
request | Request pointer from the handler |
response | Response pointer from the handler |
target | Pointer to the buffer where the request payload can be assembled |
len | Pointer to the variable, where the function stores the actual length |
max_len | Length of the "target"-Buffer |
Definition at line 80 of file er-coap-block1.c.