Lines Matching refs:ctx
230 if (coap_send(ctx, peer, response) == COAP_INVALID_MID) {
535 init_resources(coap_context_t *ctx) {
546 coap_add_resource(ctx, r);
548 coap_resource_release_userdata_handler(ctx, resource_rd_delete);
627 fill_keystore(coap_context_t *ctx) {
665 coap_context_set_pki_root_cas(ctx, NULL, root_ca_file);
667 coap_context_set_pki_root_cas(ctx, root_ca_file, NULL);
670 coap_context_set_pki(ctx, &dtls_pki);
682 coap_context_set_psk2(ctx, &dtls_psk);
688 coap_context_t *ctx = NULL;
697 ctx = coap_new_context(NULL);
698 if (!ctx) {
703 fill_keystore(ctx);
725 ep = coap_new_endpoint(ctx, &info->addr, info->proto);
736 coap_free_context(ctx);
739 return ctx;
757 coap_context_t *ctx;
843 ctx = get_context(addr_str, port_str);
844 if (!ctx)
848 coap_join_mcast_group_intf(ctx, group, group_if);
850 init_resources(ctx);
852 coap_context_set_max_token_size(ctx, extended_token_size);
869 result = coap_io_process(ctx, COAP_RESOURCE_CHECK_TIME * 1000);
871 /* coap_check_resource_list( ctx ); */
875 coap_free_context(ctx);