summaryrefslogtreecommitdiffstats
path: root/src/shrpx_http3_upstream.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-11 16:46:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-11 16:46:30 +0000
commit8e1187a02b785e56d798660a9a292ca385e1f6aa (patch)
treeb035593aa2ae37c25aeb28b537a3223c52532ab1 /src/shrpx_http3_upstream.h
parentAdding upstream version 1.61.0. (diff)
downloadnghttp2-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_http3_upstream.h')
-rw-r--r--src/shrpx_http3_upstream.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/shrpx_http3_upstream.h b/src/shrpx_http3_upstream.h
index 53c73ae..ef0fcb4 100644
--- a/src/shrpx_http3_upstream.h
+++ b/src/shrpx_http3_upstream.h
@@ -89,12 +89,12 @@ public:
int init(const UpstreamAddr *faddr, const Address &remote_addr,
const Address &local_addr, const ngtcp2_pkt_hd &initial_hd,
- const ngtcp2_cid *odcid, const uint8_t *token, size_t tokenlen,
+ const ngtcp2_cid *odcid, std::span<const uint8_t> token,
ngtcp2_token_type token_type);
int on_read(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);
int write_streams();
@@ -105,8 +105,8 @@ public:
int setup_httpconn();
void add_pending_downstream(std::unique_ptr<Downstream> downstream);
- int recv_stream_data(uint32_t flags, int64_t stream_id, const uint8_t *data,
- size_t datalen);
+ int recv_stream_data(uint32_t flags, int64_t stream_id,
+ std::span<const uint8_t> data);
int acked_stream_data_offset(int64_t stream_id, uint64_t datalen);
int extend_max_stream_data(int64_t stream_id);
void extend_max_remote_streams_bidi(uint64_t max_streams);
@@ -131,16 +131,16 @@ public:
int http_shutdown_stream_read(int64_t stream_id);
int http_reset_stream(int64_t stream_id, uint64_t app_error_code);
int http_stop_sending(int64_t stream_id, uint64_t app_error_code);
- int http_recv_data(Downstream *downstream, const uint8_t *data,
- size_t datalen);
+ int http_recv_data(Downstream *downstream, std::span<const uint8_t> data);
int handshake_completed();
int check_shutdown();
int start_graceful_shutdown();
int submit_goaway();
- int send_packet(const UpstreamAddr *faddr, const sockaddr *remote_sa,
- size_t remote_salen, const sockaddr *local_sa,
- size_t local_salen, const ngtcp2_pkt_info &pi,
- const uint8_t *data, size_t datalen, size_t gso_size);
+ std::pair<std::span<const uint8_t>, int>
+ send_packet(const UpstreamAddr *faddr, const sockaddr *remote_sa,
+ size_t remote_salen, const sockaddr *local_sa, size_t local_salen,
+ const ngtcp2_pkt_info &pi, std::span<const uint8_t> data,
+ size_t gso_size);
void qlog_write(const void *data, size_t datalen, bool fin);
int open_qlog_file(const StringRef &dir, const ngtcp2_cid &scid) const;
@@ -148,7 +148,7 @@ public:
void on_send_blocked(const UpstreamAddr *faddr,
const ngtcp2_addr &remote_addr,
const ngtcp2_addr &local_addr, const ngtcp2_pkt_info &pi,
- const uint8_t *data, size_t datalen, size_t gso_size);
+ std::span<const uint8_t> data, size_t gso_size);
int send_blocked_packet();
void signal_write_upstream_addr(const UpstreamAddr *faddr);
@@ -179,11 +179,11 @@ private:
Address local_addr;
Address remote_addr;
ngtcp2_pkt_info pi;
- const uint8_t *data;
- size_t datalen;
+ std::span<const uint8_t> data;
size_t gso_size;
} blocked[2];
std::unique_ptr<uint8_t[]> data;
+ bool no_gso;
} tx_;
};