SSL_GET_STREAM_ID(3ossl)
π
SSL_GET_STREAM_ID β the 3ossl glow-up π
okay so this is the 3ossl manual page for SSL_get_stream_id and the whole stream-type girlie squad π«Ά and honestly? it's way less scary than it looks. let's get into it β¨
πΈ NAME πΈ
SSL_get_stream_id, SSL_get_stream_type, SSL_STREAM_TYPE_NONE, SSL_STREAM_TYPE_READ, SSL_STREAM_TYPE_WRITE, SSL_STREAM_TYPE_BIDI, SSL_is_stream_local β literally the whole function family that gets you QUIC stream ID and stream type info π
π¦ SYNOPSIS π¦
#include <openssl/ssl.h>
uint64_t SSL_get_stream_id(SSL *ssl);
#define SSL_STREAM_TYPE_NONE
#define SSL_STREAM_TYPE_BIDI
#define SSL_STREAM_TYPE_READ
#define SSL_STREAM_TYPE_WRITE
int SSL_get_stream_type(SSL *ssl);
int SSL_is_stream_local(SSL *ssl);
like, that's it. that's the whole vibe check π
β¨ DESCRIPTION β¨
π SSL_get_stream_id()
she returns the QUIC stream ID for a QUIC stream SSL object β OR for a QUIC connection SSL object that has a default stream attached. either way, you get your ID π
π SSL_get_stream_type()
this one tells you what operations you can actually do on the stream, and she returns one of these bad girls:
SSL_STREAM_TYPE_NONEβ theSSLobject is a QUIC connectionSSLobject with no default stream attached. it's giving "empty inbox" energy πSSL_STREAM_TYPE_BIDIβ theSSLobject is a non-QUICSSLobject, OR it's a QUIC stream object (or a QUIC connectionSSLobject with a default stream attached) and that stream is a bidirectional QUIC stream. two-way street, main character energy πSSL_STREAM_TYPE_READβ theSSLobject is a QUIC stream object (or a QUIC connectionSSLobject with a default stream attached), and that stream is a unidirectional QUIC stream that was initiated by the remote peer. so: you can read from it, but you cannot write to it. read-only bestie, no replying πSSL_STREAM_TYPE_WRITEβ theSSLobject is a QUIC stream object (or a QUIC connectionSSLobject with a default stream attached), and that stream is a unidirectional QUIC stream initiated by the local application. so: you can write to it, but you cannot read from it. you're the talker, not the listener π¬
π SSL_is_stream_local()
determines whether a stream was created locally. simple as that, no cap π§
β NOTES β
okay bestie, listen, this part is important π
QUICv1 assigns specific meaning to the low two bits of a QUIC stream ID β but QUIC stream IDs in future versions of QUIC are not required to have the same semantics. so do not determine stream properties using these bits π instead, use SSL_get_stream_type() to figure out the stream type, and SSL_get_stream_is_local() to figure out the stream initiator. periodt.
also! SSL_get_stream_type() identifies the type of a QUIC stream based on its identity, and it does not tell you whether an operation can currently be successfully performed on a stream. like, example: you might locally initiate a unidirectional stream, write to it, and then conclude the stream using SSL_stream_conclude(3) β meaning it can no longer be written to β but SSL_get_stream_type() would still return SSL_STREAM_TYPE_WRITE. she's not lying, she's just answering a different question πββοΈ the value returned by SSL_get_stream_type() does not vary over the lifespan of a stream. iconic, consistent, unbothered π
π₯ RETURN VALUES π₯
SSL_get_stream_id()β returns a QUIC stream ID, orUINT64_MAXif you call it on anSSLobject that isn't a QUICSSLobject, or if you call it on a QUIC connectionSSLobject without a default stream attached. π note that valid QUIC stream IDs are always below2**62.SSL_get_stream_type()β returns one of theSSL_STREAM_TYPEvalues. slay.SSL_is_stream_local()β returns1if called on a QUIC streamSSLobject representing a stream that was locally initiated. returns0if called on a QUIC streamSSLobject representing a stream that was remotely initiated by a peer. and returns-1if called on any other kind ofSSLobject. three moods, one function π
π SEE ALSO π
SSL_new_stream(3), SSL_accept_stream(3) β go read these next, i'm obsessed with them π«Ά
π HISTORY π
these functions were added in OpenSSL 3.2. so if you're on something older, that's why she's not answering your texts π
π COPYRIGHT π
Copyright 2002-2023 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
and that's the whole page, bestie π this was version 3.5.0, dated 2026-09-25, page SSL_GET_STREAM_ID(3ossl) β go forth and stream responsibly β¨ππ¦
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms