|
101 | 101 | typedef struct st_picoquic_ns_client_t { |
102 | 102 | uint64_t start_time; |
103 | 103 | picoquic_cnx_t* cnx; |
104 | | - picoquic_congestion_algorithm_t* cc_algo; |
| 104 | + picoquic_congestion_algorithm_t const* cc_algo; |
| 105 | + char const* cc_option_string; |
105 | 106 | quicperf_ctx_t* quicperf_ctx; |
106 | 107 | picoquic_connection_id_t icid; |
107 | 108 | } picoquic_ns_client_t; |
@@ -143,7 +144,7 @@ int picoquic_ns_server_callback(picoquic_cnx_t* cnx, |
143 | 144 | if (cc_ctx->client_ctx[i]->cnx != NULL && |
144 | 145 | picoquic_compare_connection_id(&cnx->path[0]->p_remote_cnxid->cnx_id, |
145 | 146 | &cc_ctx->client_ctx[i]->cnx->path[0]->p_local_cnxid->cnx_id) == 0) { |
146 | | - picoquic_set_congestion_algorithm(cnx, cc_ctx->client_ctx[i]->cc_algo); |
| 147 | + picoquic_set_congestion_algorithm_ex(cnx, cc_ctx->client_ctx[i]->cc_algo, cc_ctx->client_ctx[i]->cc_option_string); |
147 | 148 | ret = 0; |
148 | 149 | } |
149 | 150 | } |
@@ -194,11 +195,13 @@ int picoquic_ns_create_client_ctx(picoquic_ns_ctx_t* cc_ctx, picoquic_ns_spec_t* |
194 | 195 | if (client_id == 0) { |
195 | 196 | client_ctx->start_time = spec->main_start_time; |
196 | 197 | client_ctx->cc_algo = spec->main_cc_algo; |
| 198 | + client_ctx->cc_option_string = spec->main_cc_options; |
197 | 199 | scenario_text = spec->main_scenario_text; |
198 | 200 | } |
199 | 201 | else { |
200 | 202 | client_ctx->start_time = spec->background_start_time; |
201 | 203 | client_ctx->cc_algo = spec->background_cc_algo; |
| 204 | + client_ctx->cc_option_string = spec->background_cc_options; |
202 | 205 | scenario_text = spec->background_scenario_text; |
203 | 206 | } |
204 | 207 | if ((client_ctx->quicperf_ctx = quicperf_create_ctx(scenario_text)) == NULL) { |
@@ -584,7 +587,7 @@ int picoquic_ns_start_connection(picoquic_ns_ctx_t* cc_ctx, int cnx_id) |
584 | 587 | ret = -1; |
585 | 588 | } |
586 | 589 | else { |
587 | | - picoquic_set_congestion_algorithm(cc_ctx->client_ctx[cnx_id]->cnx, cc_ctx->client_ctx[cnx_id]->cc_algo); |
| 590 | + picoquic_set_congestion_algorithm_ex(cc_ctx->client_ctx[cnx_id]->cnx, cc_ctx->client_ctx[cnx_id]->cc_algo, cc_ctx->client_ctx[cnx_id]->cc_option_string); |
588 | 591 | picoquic_set_callback(cc_ctx->client_ctx[cnx_id]->cnx, quicperf_callback, |
589 | 592 | cc_ctx->client_ctx[cnx_id]->quicperf_ctx); |
590 | 593 | cc_ctx->client_ctx[cnx_id]->cnx->local_parameters.max_datagram_frame_size = 1532; |
|
0 commit comments