diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-11 16:46:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-11 16:46:30 +0000 |
commit | 8e1187a02b785e56d798660a9a292ca385e1f6aa (patch) | |
tree | b035593aa2ae37c25aeb28b537a3223c52532ab1 /src/shrpx_quic_connection_handler.h | |
parent | Adding upstream version 1.61.0. (diff) | |
download | nghttp2-upstream.tar.xz nghttp2-upstream.zip |
Adding upstream version 1.62.1.upstream/1.62.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/shrpx_quic_connection_handler.h')
-rw-r--r-- | src/shrpx_quic_connection_handler.h | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/src/shrpx_quic_connection_handler.h b/src/shrpx_quic_connection_handler.h index 7f65370..374d84b 100644 --- a/src/shrpx_quic_connection_handler.h +++ b/src/shrpx_quic_connection_handler.h @@ -56,7 +56,7 @@ struct CloseWait { int handle_packet(const UpstreamAddr *faddr, const Address &remote_addr, const Address &local_addr, const ngtcp2_pkt_info &pi, - const uint8_t *data, size_t datalen); + std::span<const uint8_t> data); Worker *worker; // Source Connection IDs of the connection. @@ -83,28 +83,25 @@ public: ~QUICConnectionHandler(); int handle_packet(const UpstreamAddr *faddr, const Address &remote_addr, const Address &local_addr, const ngtcp2_pkt_info &pi, - const uint8_t *data, size_t datalen); + std::span<const uint8_t> data); // Send Retry packet. |ini_dcid| is the destination Connection ID - // which appeared in Client Initial packet and its length is - // |dcidlen|. |ini_scid| is the source Connection ID which appeared - // in Client Initial packet and its length is |scidlen|. + // which appeared in Client Initial packet. |ini_scid| is the + // source Connection ID which appeared in Client Initial packet. int send_retry(const UpstreamAddr *faddr, uint32_t version, - const uint8_t *ini_dcid, size_t ini_dcidlen, - const uint8_t *ini_scid, size_t ini_scidlen, - const Address &remote_addr, const Address &local_addr, - size_t max_pktlen); + std::span<const uint8_t> ini_dcid, + std::span<const uint8_t> ini_scid, const Address &remote_addr, + const Address &local_addr, size_t max_pktlen); // Send Version Negotiation packet. |ini_dcid| is the destination - // Connection ID which appeared in Client Initial packet and its - // length is |dcidlen|. |ini_scid| is the source Connection ID - // which appeared in Client Initial packet and its length is - // |scidlen|. + // Connection ID which appeared in Client Initial packet. + // |ini_scid| is the source Connection ID which appeared in Client + // Initial packet. int send_version_negotiation(const UpstreamAddr *faddr, uint32_t version, - const uint8_t *ini_dcid, size_t ini_dcidlen, - const uint8_t *ini_scid, size_t ini_scidlen, + std::span<const uint8_t> ini_dcid, + std::span<const uint8_t> ini_scid, const Address &remote_addr, const Address &local_addr); int send_stateless_reset(const UpstreamAddr *faddr, size_t pktlen, - const uint8_t *dcid, size_t dcidlen, + std::span<const uint8_t> dcid, const Address &remote_addr, const Address &local_addr); // Send Initial CONNECTION_CLOSE. |ini_dcid| is the destination @@ -120,8 +117,8 @@ public: ClientHandler * handle_new_connection(const UpstreamAddr *faddr, const Address &remote_addr, const Address &local_addr, const ngtcp2_pkt_hd &hd, - const ngtcp2_cid *odcid, const uint8_t *token, - size_t tokenlen, ngtcp2_token_type token_type); + const ngtcp2_cid *odcid, std::span<const uint8_t> token, + ngtcp2_token_type token_type); void add_connection_id(const ngtcp2_cid &cid, ClientHandler *handler); void remove_connection_id(const ngtcp2_cid &cid); |