Home
last modified time | relevance | path

Searched refs:response (Results 1 – 13 of 13) sorted by relevance

/net-tools-3.4.0/libcoap/tests/
Dtest_error_response.c34 coap_pdu_t *response; in t_error_response1() local
42 response = coap_new_error_response(pdu, COAP_RESPONSE_CODE(400), opts); in t_error_response1()
44 CU_ASSERT_PTR_NOT_NULL(response); in t_error_response1()
46 CU_ASSERT(response->length == sizeof(teststr)); in t_error_response1()
47 CU_ASSERT(response->hdr->version == 1); in t_error_response1()
48 CU_ASSERT(response->hdr->type == COAP_MESSAGE_ACK); in t_error_response1()
49 CU_ASSERT(response->hdr->token_length == 0); in t_error_response1()
50 CU_ASSERT(response->hdr->code == 0x80); in t_error_response1()
53 CU_ASSERT(memcmp(response->hdr, teststr, sizeof(teststr)) == 0); in t_error_response1()
63 coap_pdu_t *response; in t_error_response2() local
[all …]
Dtest_wellknown.c162 coap_pdu_t *response; in t_wellknown4() local
165 response = coap_wellknown_response(ctx, pdu); in t_wellknown4()
167 CU_ASSERT_PTR_NOT_NULL(response); in t_wellknown4()
169 CU_ASSERT(coap_get_block(response, COAP_OPTION_BLOCK2, &block) != 0); in t_wellknown4()
174 == (unsigned char *)response->hdr + response->length - response->data); in t_wellknown4()
176 coap_delete_pdu(response); in t_wellknown4()
184 coap_pdu_t *response; in t_wellknown5() local
197 response = coap_wellknown_response(ctx, pdu); in t_wellknown5()
199 CU_ASSERT_PTR_NOT_NULL(response); in t_wellknown5()
201 CU_ASSERT(coap_get_block(response, COAP_OPTION_BLOCK2, &block) != 0); in t_wellknown5()
[all …]
/net-tools-3.4.0/libcoap/examples/
Detsi_iot_01.c131 coap_pdu_t *response) { in hnd_get_index() argument
134 response->hdr->code = COAP_RESPONSE_CODE(205); in hnd_get_index()
136 coap_add_option(response, COAP_OPTION_CONTENT_TYPE, in hnd_get_index()
139 coap_add_option(response, COAP_OPTION_MAXAGE, in hnd_get_index()
142 coap_add_data(response, strlen(INDEX), (unsigned char *)INDEX); in hnd_get_index()
149 coap_pdu_t *response) { in hnd_get_resource() argument
157 response->hdr->code = COAP_RESPONSE_CODE(500); in hnd_get_resource()
162 response->hdr->code = COAP_RESPONSE_CODE(205); in hnd_get_resource()
164 coap_add_option(response, COAP_OPTION_CONTENT_TYPE, in hnd_get_resource()
171 coap_add_option(response, COAP_OPTION_ETAG, sizeof(etag), etag); in hnd_get_resource()
[all …]
Dcoap-server.c75 coap_pdu_t *response) { in hnd_get_index() argument
78 response->hdr->code = COAP_RESPONSE_CODE(205); in hnd_get_index()
80 coap_add_option(response, in hnd_get_index()
84 coap_add_option(response, in hnd_get_index()
88 coap_add_data(response, strlen(INDEX), (unsigned char *)INDEX); in hnd_get_index()
98 coap_pdu_t *response) { in hnd_get_time() argument
110 response->hdr->code = in hnd_get_time()
115 coap_add_option(response, in hnd_get_time()
121 coap_add_option(response, in hnd_get_time()
125 coap_add_option(response, in hnd_get_time()
[all …]
Dcoap-rd.c102 coap_pdu_t *response) { in hnd_get_resource() argument
108 response->hdr->code = COAP_RESPONSE_CODE(205); in hnd_get_resource()
110 coap_add_option(response, in hnd_get_resource()
117 coap_add_option(response, COAP_OPTION_ETAG, rd->etag_len, rd->etag); in hnd_get_resource()
120 coap_add_data(response, rd->data.length, rd->data.s); in hnd_get_resource()
130 coap_pdu_t *response) { in hnd_put_resource() argument
132 response->hdr->code = COAP_RESPONSE_CODE(501); in hnd_put_resource()
136 coap_pdu_t *response; in hnd_put_resource()
183 response = coap_pdu_init(type, code, request->hdr->id, size); in hnd_put_resource()
185 if (!response) { in hnd_put_resource()
[all …]
DREADME.etsi_iot22 [+] TD_COAP_CORE_09 Perform GET transaction with delayed response (CON mode, no piggyback)
27 [?] TD_COAP_CORE_14 Interoperate in lossy context (CON mode, piggybacked response)
28 [?] TD_COAP_CORE_15 Interoperate in lossy context (CON mode, delayed response)
Dcoap-client.txt.in42 option in its response to a GET request, coap-client will automatically
/net-tools-3.4.0/libcoap/src/
Dnet.c538 coap_pdu_t *response; in coap_send_ack() local
542 response = coap_pdu_init(COAP_MESSAGE_ACK, 0, request->hdr->id, in coap_send_ack()
544 if (response) { in coap_send_ack()
545 result = coap_send(context, local_interface, dst, response); in coap_send_ack()
546 coap_delete_pdu(response); in coap_send_ack()
630 coap_pdu_t *response; in coap_send_error() local
636 response = coap_new_error_response(request, code, opts); in coap_send_error()
637 if (response) { in coap_send_error()
638 result = coap_send(context, local_interface, dst, response); in coap_send_error()
639 coap_delete_pdu(response); in coap_send_error()
[all …]
Dresource.c612 coap_pdu_t *response; local
630 response = coap_pdu_init(COAP_MESSAGE_CON, 0, 0, COAP_MAX_PDU_SIZE);
631 if (!response) {
638 if (!coap_add_token(response, obs->token_length, obs->token)) {
642 coap_delete_pdu(response);
649 response->hdr->id = coap_new_message_id(context);
652 response->hdr->type = COAP_MESSAGE_NON;
654 response->hdr->type = COAP_MESSAGE_CON;
657 h(context, r, &obs->local_if, &obs->subscriber, NULL, &token, response);
662 if (response->hdr->type == COAP_MESSAGE_CON) {
[all …]
/net-tools-3.4.0/libcoap/examples/contiki/
Dserver.c95 coap_pdu_t *response) { in hnd_get_time() argument
107 response->hdr->code = in hnd_get_time()
112 coap_add_option(response, COAP_OPTION_OBSERVE, in hnd_get_time()
117 coap_add_option(response, COAP_OPTION_CONTENT_FORMAT, in hnd_get_time()
120 coap_add_option(response, COAP_OPTION_MAXAGE, in hnd_get_time()
135 min(sizeof(buf), response->max_size - response->length), in hnd_get_time()
137 coap_add_data(response, len, buf); in hnd_get_time()
/net-tools-3.4.0/python-websocket-server/websocket_server/
Dwebsocket_server.py328 response = self.make_handshake_response(key)
329 self.handshake_done = self.request.send(response.encode())
/net-tools-3.4.0/libcoap/
DChangeLog69 when generating a response for .well-known/core.
102 tests for error response generation
/net-tools-3.4.0/
DREADME.md73 and time to get the response are all recorded and printed to the standard