37 #ifndef COAP_BLOCKING_API_H_ 38 #define COAP_BLOCKING_API_H_ 46 typedef struct coap_request_state {
48 struct process *process;
49 coap_transaction_t *transaction;
50 coap_message_t *response;
52 } coap_request_state_t;
54 typedef void (* coap_blocking_response_handler_t)(coap_message_t *response);
57 (coap_request_state_t *state, process_event_t ev,
58 coap_endpoint_t *remote,
59 coap_message_t *request,
60 coap_blocking_response_handler_t request_callback));
62 #define COAP_BLOCKING_REQUEST(server_endpoint, request, chunk_handler) \ 64 static coap_request_state_t request_state; \ 65 PT_SPAWN(process_pt, &request_state.pt, \ 66 coap_blocking_request(&request_state, ev, \ 68 request, chunk_handler) \ Protothreads implementation.
#define PT_THREAD(name_args)
Declaration of a protothread.
CoAP module for reliable transport