37#ifndef COAP_BLOCKING_API_H_
38#define COAP_BLOCKING_API_H_
47typedef struct coap_blocking_request_state {
48 coap_request_state_t state;
50 struct process *process;
51} coap_blocking_request_state_t;
53typedef void (* coap_blocking_response_handler_t)(coap_message_t *response);
56 (coap_blocking_request_state_t *blocking_state, process_event_t ev,
57 coap_endpoint_t *remote,
58 coap_message_t *request,
59 coap_blocking_response_handler_t request_callback));
61#define COAP_BLOCKING_REQUEST(server_endpoint, request, chunk_handler) \
63 static coap_blocking_request_state_t blocking_state; \
64 PT_SPAWN(process_pt, &blocking_state.pt, \
65 coap_blocking_request(&blocking_state, ev, \
67 request, chunk_handler) \
Common request state for all the APIs.
CoAP module for reliable transport.
#define PT_THREAD(name_args)
Declaration of a protothread.
Protothreads implementation.