summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2023-04-18 19:30:54 +0100
committerHugo Landau <hlandau@openssl.org>2023-05-12 14:47:11 +0100
commitb757beb5f326ce4a7da021d0f4c52e03e37e1945 (patch)
treea76654aa4195bf158e6aae90fd51808e3a10f24f /include
parente8fe7a21ea253408930d570ce00e6d3a78652162 (diff)
downloadopenssl-new-b757beb5f326ce4a7da021d0f4c52e03e37e1945.tar.gz
QUIC TSERVER: Add support for multiple streams
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20765)
Diffstat (limited to 'include')
-rw-r--r--include/internal/quic_tserver.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/internal/quic_tserver.h b/include/internal/quic_tserver.h
index 0d0d201497..fd657049ab 100644
--- a/include/internal/quic_tserver.h
+++ b/include/internal/quic_tserver.h
@@ -86,6 +86,7 @@ int ossl_quic_tserver_is_terminated(const QUIC_TSERVER *srv);
* ossl_quic_tserver_has_read_ended() to identify this condition.
*/
int ossl_quic_tserver_read(QUIC_TSERVER *srv,
+ uint64_t stream_id,
unsigned char *buf,
size_t buf_len,
size_t *bytes_read);
@@ -93,7 +94,7 @@ int ossl_quic_tserver_read(QUIC_TSERVER *srv,
/*
* Returns 1 if the read part of the stream has ended normally.
*/
-int ossl_quic_tserver_has_read_ended(QUIC_TSERVER *srv);
+int ossl_quic_tserver_has_read_ended(QUIC_TSERVER *srv, uint64_t stream_id);
/*
* Attempts to write to stream 0. Writes the number of bytes consumed to
@@ -107,6 +108,7 @@ int ossl_quic_tserver_has_read_ended(QUIC_TSERVER *srv);
* Returns 0 if connection is not currently active.
*/
int ossl_quic_tserver_write(QUIC_TSERVER *srv,
+ uint64_t stream_id,
const unsigned char *buf,
size_t buf_len,
size_t *bytes_written);
@@ -114,7 +116,15 @@ int ossl_quic_tserver_write(QUIC_TSERVER *srv,
/*
* Signals normal end of the stream.
*/
-int ossl_quic_tserver_conclude(QUIC_TSERVER *srv);
+int ossl_quic_tserver_conclude(QUIC_TSERVER *srv, uint64_t stream_id);
+
+/*
+ * Create a server-initiated stream. The stream ID of the newly
+ * created stream is written to *stream_id.
+ */
+int ossl_quic_tserver_stream_new(QUIC_TSERVER *srv,
+ int is_uni,
+ uint64_t *stream_id);
BIO *ossl_quic_tserver_get0_rbio(QUIC_TSERVER *srv);