mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-07 02:28:53 +08:00
nghttpx: Use SHRPX_MAX_UDP_PAYLOAD_SIZE
This commit is contained in:
@@ -295,7 +295,7 @@ int QUICConnectionHandler::send_retry(
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::array<uint8_t, 1280> buf;
|
std::array<uint8_t, SHRPX_MAX_UDP_PAYLOAD_SIZE> buf;
|
||||||
|
|
||||||
auto nwrite =
|
auto nwrite =
|
||||||
ngtcp2_crypto_write_retry(buf.data(), buf.size(), version, &iscid,
|
ngtcp2_crypto_write_retry(buf.data(), buf.size(), version, &iscid,
|
||||||
@@ -319,7 +319,7 @@ int QUICConnectionHandler::send_version_negotiation(
|
|||||||
sv[0] = generate_reserved_version(remote_addr, version);
|
sv[0] = generate_reserved_version(remote_addr, version);
|
||||||
sv[1] = NGTCP2_PROTO_VER_V1;
|
sv[1] = NGTCP2_PROTO_VER_V1;
|
||||||
|
|
||||||
std::array<uint8_t, 1280> buf;
|
std::array<uint8_t, SHRPX_MAX_UDP_PAYLOAD_SIZE> buf;
|
||||||
|
|
||||||
uint8_t rand_byte;
|
uint8_t rand_byte;
|
||||||
util::random_bytes(&rand_byte, &rand_byte + 1, worker_->get_randgen());
|
util::random_bytes(&rand_byte, &rand_byte + 1, worker_->get_randgen());
|
||||||
@@ -364,7 +364,7 @@ int QUICConnectionHandler::send_stateless_reset(const UpstreamAddr *faddr,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::array<uint8_t, 1280> buf;
|
std::array<uint8_t, SHRPX_MAX_UDP_PAYLOAD_SIZE> buf;
|
||||||
|
|
||||||
auto nwrite =
|
auto nwrite =
|
||||||
ngtcp2_pkt_write_stateless_reset(buf.data(), buf.size(), token.data(),
|
ngtcp2_pkt_write_stateless_reset(buf.data(), buf.size(), token.data(),
|
||||||
|
|||||||
Reference in New Issue
Block a user