Lines Matching refs:response
82 struct coap_packet response;
91 /* Determine response type */
94 coap_packet_init(&response, data, sizeof(data), COAP_VERSION_1, type, tkl, token,
98 coap_append_option_int(&response, COAP_OPTION_CONTENT_FORMAT,
102 coap_packet_append_payload_marker(&response);
103 coap_packet_append_payload(&response, (uint8_t *)msg, sizeof(msg));
105 /* Send to response back to the client */
106 return coap_resource_send(resource, &response, addr, addr_len, NULL);
114 /* Return a CoAP response code as a shortcut for an empty ACK message */
127 As demonstrated in the example above, a CoAP resource handler can return response codes to let
128 the server respond with an empty ACK response.
152 struct coap_packet response;
158 /* Determine response type */
165 coap_packet_init(&response, data, sizeof(data), COAP_VERSION_1, type, tkl, token,
169 coap_append_option_int(&response, COAP_OPTION_OBSERVE, age);
173 coap_append_option_int(&response, COAP_OPTION_CONTENT_FORMAT,
184 coap_packet_append_payload_marker(&response);
185 coap_packet_append_payload(&response, (uint8_t *)payload, strlen(payload));
187 return coap_resource_send(resource, &response, addr, addr_len, NULL);