Searched refs:main_coap_context (Results 1 – 4 of 4) sorted by relevance
/third_party/libcoap/examples/lwip/ |
D | server-coap.c | 17 coap_context_t *main_coap_context; variable 155 main_coap_context = coap_new_context(NULL); in server_coap_init() 156 LWIP_ASSERT("Failed to initialize context", main_coap_context != NULL); in server_coap_init() 165 coap_context_set_psk2(main_coap_context, &setup_data); in server_coap_init() 181 ep = coap_new_endpoint(main_coap_context, &info->addr, info->proto); in server_coap_init() 194 coap_context_set_max_idle_sessions(main_coap_context, MEMP_NUM_COAPSESSION -1); in server_coap_init() 196 init_coap_resources(main_coap_context); in server_coap_init() 197 coap_lwip_set_input_wait_handler(main_coap_context, input_wait, input_arg); in server_coap_init() 202 coap_free_context(main_coap_context); in server_coap_finished() 203 main_coap_context = NULL; in server_coap_finished() [all …]
|
D | client-coap.c | 28 static coap_context_t *main_coap_context = NULL; variable 171 main_coap_context = coap_new_context(NULL); in client_coap_init() 172 LWIP_ASSERT("Failed to initialize context", main_coap_context != NULL); in client_coap_init() 174 coap_context_set_block_mode(main_coap_context, COAP_BLOCK_USE_LIBCOAP); in client_coap_init() 175 coap_lwip_set_input_wait_handler(main_coap_context, input_wait, input_arg); in client_coap_init() 178 session = coap_new_client_session(main_coap_context, NULL, &dst, in client_coap_init() 198 session = coap_new_client_session_psk2(main_coap_context, NULL, &dst, in client_coap_init() 204 coap_register_response_handler(main_coap_context, message_handler); in client_coap_init() 205 coap_register_nack_handler(main_coap_context, nack_handler); in client_coap_init() 231 coap_free_context(main_coap_context); in client_coap_finished() [all …]
|
/third_party/libcoap/examples/riot/examples_libcoap_client/ |
D | client-coap.c | 42 static coap_context_t *main_coap_context = NULL; variable 158 main_coap_context = coap_new_context(NULL); in client_coap_init() 159 if (!main_coap_context) { in client_coap_init() 164 coap_context_set_block_mode(main_coap_context, COAP_BLOCK_USE_LIBCOAP); in client_coap_init() 167 session = coap_new_client_session(main_coap_context, NULL, &dst, in client_coap_init() 170 session = coap_new_client_session(main_coap_context, NULL, &dst, in client_coap_init() 193 session = coap_new_client_session_psk2(main_coap_context, NULL, &dst, in client_coap_init() 206 coap_register_response_handler(main_coap_context, message_handler); in client_coap_init() 207 coap_register_nack_handler(main_coap_context, nack_handler); in client_coap_init() 241 coap_io_process(main_coap_context, 1000); in client_coap_init() [all …]
|
/third_party/libcoap/examples/riot/examples_libcoap_server/ |
D | server-coap.c | 26 coap_context_t *main_coap_context; variable 149 main_coap_context = coap_new_context(NULL); in init_coap_context_endpoints() 150 if (!main_coap_context) { in init_coap_context_endpoints() 162 coap_context_set_psk2(main_coap_context, &setup_data); in init_coap_context_endpoints() 177 ep = coap_new_endpoint(main_coap_context, &info->addr, info->proto); in init_coap_context_endpoints() 207 coap_context_set_max_idle_sessions(main_coap_context, 2); in server_coap_run() 209 init_coap_resources(main_coap_context); in server_coap_run() 214 coap_io_process(main_coap_context, 1000); in server_coap_run() 218 coap_free_context(main_coap_context); in server_coap_run() 219 main_coap_context = NULL; in server_coap_run()
|