mirror of
https://gitee.com/openharmony/third_party_nghttp2
synced 2024-11-23 16:00:07 +00:00
Compile with the latest ngtcp2
This commit is contained in:
parent
e4a8c4813c
commit
51987107a2
@ -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 && \
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user