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 \ zlib1g libev4 libjemalloc2 libc-ares2 \
ca-certificates psmisc \ ca-certificates psmisc \
python && \ 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 && \ 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 && \ git clone --depth 1 https://github.com/ngtcp2/nghttp3 && \
cd nghttp3 && autoreconf -i && \ 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)}, {remote_addrlen, const_cast<sockaddr *>(remote_addr)},
}; };
rv = ngtcp2_conn_client_new(&quic.conn, &dcid, &scid, &path, NGTCP2_PROTO_VER, rv = ngtcp2_conn_client_new(&quic.conn, &dcid, &scid, &path,
&callbacks, &settings, nullptr, this); NGTCP2_PROTO_VER_MIN, &callbacks, &settings,
nullptr, this);
if (rv != 0) { if (rv != 0) {
return -1; return -1;
} }
@ -407,13 +408,13 @@ void Client::quic_close_connection() {
return; return;
case quic::ErrorType::Transport: case quic::ErrorType::Transport:
nwrite = ngtcp2_conn_write_connection_close( nwrite = ngtcp2_conn_write_connection_close(
quic.conn, &ps.path, buf.data(), quic.max_pktlen, quic.last_error.code, quic.conn, &ps.path, nullptr, buf.data(), quic.max_pktlen,
timestamp(worker->loop)); quic.last_error.code, timestamp(worker->loop));
break; break;
case quic::ErrorType::Application: case quic::ErrorType::Application:
nwrite = ngtcp2_conn_write_application_close( nwrite = ngtcp2_conn_write_application_close(
quic.conn, &ps.path, buf.data(), quic.max_pktlen, quic.last_error.code, quic.conn, &ps.path, nullptr, buf.data(), quic.max_pktlen,
timestamp(worker->loop)); quic.last_error.code, timestamp(worker->loop));
break; break;
default: default:
assert(0); assert(0);