Commit 61aae5b9 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Add configuration to enable ngtcp2 logging (no cmd-line opt yet)

parent 028996af
......@@ -707,6 +707,9 @@ struct QUICConfig {
struct {
ev_tstamp idle;
} timeout;
struct {
bool log;
} debug;
};
// custom error page
......
......@@ -451,9 +451,14 @@ int Http3Upstream::init(const UpstreamAddr *faddr, const Address &remote_addr,
return -1;
}
auto config = get_config();
auto &quicconf = config->quic;
ngtcp2_settings settings;
ngtcp2_settings_default(&settings);
settings.log_printf = log_printf;
if (quicconf.debug.log) {
settings.log_printf = log_printf;
}
settings.initial_ts = quic_timestamp();
settings.cc_algo = NGTCP2_CC_ALGO_BBR;
settings.max_window = 6_m;
......@@ -461,9 +466,6 @@ int Http3Upstream::init(const UpstreamAddr *faddr, const Address &remote_addr,
settings.max_udp_payload_size = SHRPX_MAX_UDP_PAYLOAD_SIZE;
settings.rand_ctx.native_handle = &worker->get_randgen();
auto config = get_config();
auto &quicconf = config->quic;
ngtcp2_transport_params params;
ngtcp2_transport_params_default(&params);
params.initial_max_streams_bidi = 100;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment