quic: Configure settings with options
This commit is contained in:
parent
bb36df8b2e
commit
750c23f319
|
@ -271,9 +271,11 @@ int Http3Session::init_conn() {
|
|||
nullptr, // push_stream,
|
||||
};
|
||||
|
||||
auto config = client_->worker->config;
|
||||
|
||||
nghttp3_conn_settings settings;
|
||||
nghttp3_conn_settings_default(&settings);
|
||||
settings.qpack_max_table_capacity = 4096;
|
||||
settings.qpack_max_table_capacity = config->header_table_size;
|
||||
settings.qpack_blocked_streams = 100;
|
||||
|
||||
auto mem = nghttp3_mem_default();
|
||||
|
|
|
@ -569,16 +569,17 @@ int Client::quic_init(const sockaddr *local_addr, socklen_t local_addrlen,
|
|||
generate_cid(scid);
|
||||
generate_cid(dcid);
|
||||
|
||||
auto config = worker->config;
|
||||
|
||||
ngtcp2_settings settings;
|
||||
ngtcp2_settings_default(&settings);
|
||||
settings.log_printf = debug_log_printf;
|
||||
settings.log_printf = nullptr;
|
||||
settings.initial_ts = timestamp(worker->loop);
|
||||
settings.max_stream_data_bidi_local = 256_k;
|
||||
settings.max_stream_data_bidi_remote = 256_k;
|
||||
settings.max_stream_data_uni = 256_k;
|
||||
settings.max_data = 1_m;
|
||||
settings.max_streams_bidi = 1;
|
||||
settings.max_stream_data_bidi_local = (1 << config->window_bits) - 1;
|
||||
settings.max_stream_data_uni = (1 << config->window_bits) - 1;
|
||||
settings.max_data = (1 << config->connection_window_bits) - 1;
|
||||
settings.max_streams_bidi = 0;
|
||||
settings.max_streams_uni = 100;
|
||||
settings.idle_timeout = 30 * NGTCP2_SECONDS;
|
||||
|
||||
|
|
Loading…
Reference in New Issue