summaryrefslogtreecommitdiffstats
path: root/lib/nghttp2_outbound_item.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 08:52:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 08:52:22 +0000
commit6a7eecec57783a042d12f895d5ae148c44f4d074 (patch)
tree77a2c3c5612655f1dd15e9a2ddf14e13bab90b1f /lib/nghttp2_outbound_item.h
parentReleasing progress-linux version 1.59.0-1~progress7.99u1. (diff)
downloadnghttp2-6a7eecec57783a042d12f895d5ae148c44f4d074.tar.xz
nghttp2-6a7eecec57783a042d12f895d5ae148c44f4d074.zip
Merging upstream version 1.60.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/nghttp2_outbound_item.h')
-rw-r--r--lib/nghttp2_outbound_item.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/lib/nghttp2_outbound_item.h b/lib/nghttp2_outbound_item.h
index bd4611b..4e91750 100644
--- a/lib/nghttp2_outbound_item.h
+++ b/lib/nghttp2_outbound_item.h
@@ -33,9 +33,32 @@
#include "nghttp2_frame.h"
#include "nghttp2_mem.h"
+#define NGHTTP2_DATA_PROVIDER_V1 1
+#define NGHTTP2_DATA_PROVIDER_V2 2
+
+typedef struct nghttp2_data_provider_wrap {
+ int version;
+ union {
+ struct {
+ nghttp2_data_source source;
+ void *read_callback;
+ };
+ nghttp2_data_provider v1;
+ nghttp2_data_provider2 v2;
+ } data_prd;
+} nghttp2_data_provider_wrap;
+
+nghttp2_data_provider_wrap *
+nghttp2_data_provider_wrap_v1(nghttp2_data_provider_wrap *dpw,
+ const nghttp2_data_provider *data_prd);
+
+nghttp2_data_provider_wrap *
+nghttp2_data_provider_wrap_v2(nghttp2_data_provider_wrap *dpw,
+ const nghttp2_data_provider2 *data_prd);
+
/* struct used for HEADERS and PUSH_PROMISE frame */
typedef struct {
- nghttp2_data_provider data_prd;
+ nghttp2_data_provider_wrap dpw;
void *stream_user_data;
/* error code when request HEADERS is canceled by RST_STREAM while
it is in queue. */
@@ -50,7 +73,7 @@ typedef struct {
/**
* The data to be sent for this DATA frame.
*/
- nghttp2_data_provider data_prd;
+ nghttp2_data_provider_wrap dpw;
/**
* The flags of DATA frame. We use separate flags here and
* nghttp2_data frame. The latter contains flags actually sent to