From 20cbd269c47bf79fbcc07f012733628b87a5190f Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 16 Aug 2021 16:58:11 +0900 Subject: [PATCH] Compile with the latest ngtcp2 --- src/h2load.h | 9 --------- src/h2load_quic.cc | 9 +-------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/h2load.h b/src/h2load.h index 2d18fbf8..061c776f 100644 --- a/src/h2load.h +++ b/src/h2load.h @@ -317,13 +317,6 @@ struct Stream { Stream(); }; -struct Crypto { - Crypto() : datalen(0), acked_offset(0) {} - std::array data; - size_t datalen; - size_t acked_offset; -}; - struct Client { DefaultMemchunks wb; std::unordered_map streams; @@ -338,8 +331,6 @@ struct Client { ev_timer pkt_timer; ngtcp2_conn *conn; quic::Error last_error; - // Client never send CRYPTO in Short packet. - std::array crypto; size_t max_pktlen; bool close_requested; FILE *qlog_file; diff --git a/src/h2load_quic.cc b/src/h2load_quic.cc index 17f4f73c..a9709177 100644 --- a/src/h2load_quic.cc +++ b/src/h2load_quic.cc @@ -325,7 +325,6 @@ int Client::quic_init(const sockaddr *local_addr, socklen_t local_addrlen, ngtcp2_crypto_decrypt_cb, ngtcp2_crypto_hp_mask_cb, h2load::recv_stream_data, - nullptr, // acked_crypto_offset h2load::acked_stream_data_offset, nullptr, // stream_open h2load::stream_close, @@ -499,14 +498,8 @@ void Client::quic_set_tls_alert(uint8_t alert) { void Client::quic_write_client_handshake(ngtcp2_crypto_level level, const uint8_t *data, size_t datalen) { assert(level < 2); - auto &crypto = quic.crypto[level]; - assert(crypto.data.size() >= crypto.datalen + datalen); - auto p = std::begin(crypto.data) + crypto.datalen; - std::copy_n(data, datalen, p); - crypto.datalen += datalen; - - ngtcp2_conn_submit_crypto_data(quic.conn, level, p, datalen); + ngtcp2_conn_submit_crypto_data(quic.conn, level, data, datalen); } void quic_pkt_timeout_cb(struct ev_loop *loop, ev_timer *w, int revents) {