Compile with the latest ngtcp2

This commit is contained in:
Tatsuhiro Tsujikawa 2021-08-16 16:58:11 +09:00
parent 7c2cd43dfa
commit 20cbd269c4
2 changed files with 1 additions and 17 deletions

View File

@ -317,13 +317,6 @@ struct Stream {
Stream();
};
struct Crypto {
Crypto() : datalen(0), acked_offset(0) {}
std::array<uint8_t, 1024> data;
size_t datalen;
size_t acked_offset;
};
struct Client {
DefaultMemchunks wb;
std::unordered_map<int32_t, Stream> 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, 2> crypto;
size_t max_pktlen;
bool close_requested;
FILE *qlog_file;

View File

@ -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) {