TSHTTPTXNC...RIORITYGET(3ts)

πŸ“¦
version 9.2.5 Β· 5 versions
, in ubuntu questing

✨ 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, then stream_dependency gets populated with -1 and the value of weight is 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

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