Compile with the latest ngtcp2

This commit is contained in:
Tatsuhiro Tsujikawa 2020-09-24 23:41:09 +09:00
parent 4bedc9a074
commit c5102d3f81
2 changed files with 8 additions and 7 deletions

View File

@ -5,7 +5,7 @@ RUN /usr/local/bin/clean-install git g++ make binutils autoconf automake autotoo
zlib1g libev4 libjemalloc2 libc-ares2 \
ca-certificates psmisc \
python && \
git clone --depth 1 -b OpenSSL_1_1_1g-quic-draft-29 https://github.com/tatsuhiro-t/openssl && \
git clone --depth 1 -b OpenSSL_1_1_1g-quic-draft-30 https://github.com/tatsuhiro-t/openssl && \
cd openssl && ./config enable-tls1_3 --openssldir=/etc/ssl && make -j$(nproc) && make install_sw && cd .. && rm -rf openssl && \
git clone --depth 1 https://github.com/ngtcp2/nghttp3 && \
cd nghttp3 && autoreconf -i && \

View File

@ -379,8 +379,9 @@ int Client::quic_init(const sockaddr *local_addr, socklen_t local_addrlen,
{remote_addrlen, const_cast<sockaddr *>(remote_addr)},
};
rv = ngtcp2_conn_client_new(&quic.conn, &dcid, &scid, &path, NGTCP2_PROTO_VER,
&callbacks, &settings, nullptr, this);
rv = ngtcp2_conn_client_new(&quic.conn, &dcid, &scid, &path,
NGTCP2_PROTO_VER_MIN, &callbacks, &settings,
nullptr, this);
if (rv != 0) {
return -1;
}
@ -407,13 +408,13 @@ void Client::quic_close_connection() {
return;
case quic::ErrorType::Transport:
nwrite = ngtcp2_conn_write_connection_close(
quic.conn, &ps.path, buf.data(), quic.max_pktlen, quic.last_error.code,
timestamp(worker->loop));
quic.conn, &ps.path, nullptr, buf.data(), quic.max_pktlen,
quic.last_error.code, timestamp(worker->loop));
break;
case quic::ErrorType::Application:
nwrite = ngtcp2_conn_write_application_close(
quic.conn, &ps.path, buf.data(), quic.max_pktlen, quic.last_error.code,
timestamp(worker->loop));
quic.conn, &ps.path, nullptr, buf.data(), quic.max_pktlen,
quic.last_error.code, timestamp(worker->loop));
break;
default:
assert(0);