TSHTTPTXNC...RIORITYGET(3ts)
β¨ NAME β¨
TSHttpTxnClientStreamPriorityGet β bestie, it's the TSHttpTxnClientStreamPriorityGet API function π
(from the TSHTTPTXNC...RIORITYGET (3ts) manual, Apache Traffic Server, yes we're fancy here)
πΈ SYNOPSIS πΈ
#include <ts/ts.h>
TSReturnCode TSHttpTxnClientStreamPriorityGet(TSHttpTxn txnp,
TSHttpPriority *priority)
π¦ DESCRIPTION π¦
Okay so picture this: you got a transaction, right? And you wanna know the priority info for the HTTP stream that's attached to it. That's literally what this does. The priority info it finds gets plopped right into your priority output variable. Slay.
Now, the TSHttpPriority type is designed to be agnostic about which HTTP protocol versions support HTTP streams β it doesn't play favorites, no cap. So what you're supposed to do is pass in a pointer that you've casted to TSHttpPriority, coming from a TSHttp2Priority structure you already allocated earlier. Iconic, right? And the whole design is looking ahead to the future, anticipating support for other HTTP versions that have streams, like HTTP/3. Main character energy for real. π₯
The TSHttp2Priority structure has this declaration:
typedef struct {
uint8_t priority_type; /** HTTP_PROTOCOL_TYPE_HTTP_2 */
int32_t stream_dependency;
uint8_t weight;
} TSHttp2Priority;
So when you hit up TSHttpTxnClientStreamPriorityGet, the dependency and the weight get populated into the stream_dependency and weight members respectively. Easy.
But WAIT β if the stream tied to your transaction has no dependency, thenstream_dependencygets populated with-1and the value ofweightis straight up meaningless. Don't trust it. π
If you want the deets on HTTP/2 stream priority, go read RFC 7540 section 5.3. That's the source, iykyk.
Also important: this API returns an error if the transaction you handed it is not an HTTP/2 transaction. So vibe check your transaction first. π
π SEE ALSO π
TSHttpTxnClientStreamIdGet
π COPYRIGHT π
2026, dev@trafficserver.apache.org
And that's the whole page, bestie β Apache Traffic Server 9.2, dated Feb 12, 2026 π thanks for reading, go get those streams prioritized, mwah ππ«Ά
π¦ where this page comes from
- ubuntu questing: trafficserver-dev 9.2.5+ds-1ubuntu2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms