TSHTTPTXNISWEBSOCKET(3ts)

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

πŸ’– TSHTTPTXNISWEBSOCKET πŸ’–

okay bestie, welcome to the Apache Traffic Server manual, 3ts edition ✨ this one's a tiny little icon, a one-function wonder, and honestly? we're obsessed 🫢


🌸 NAME 🌸

TSHttpTxnIsWebsocket β€” the vibe check that tells you whether a request is tryna start a Websocket connection πŸ‘€


✨ SYNOPSIS ✨

#include <ts/ts.h>

int TSHttpTxnIsWebsocket(TSHttpTxn txnp)

like, that's it. that's the whole thing. no cap πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so TSHttpTxnIsWebsocket() tests whether the transaction is a WebSocket upgrade request ✨

that's the whole job. it looks at your transaction (txnp, the main character here πŸ‘‘) and is like "hmm, are you trying to upgrade to WebSocket rn?" and answers you fr fr.

no extra steps, no drama, no side quests. it just checks. periodt.


πŸŽ€ RETURN VALUES πŸŽ€

if the relevant header value is found, you get a non-zero value back 🌈 β€” that's your yes, your slay, your green flag πŸ’š

(and iykyk what a zero means. that's a no. that's the "it's giving regular HTTP request" energy 😭)


πŸ‘‘ SEE ALSO πŸ‘‘

  • TSAPI(3ts) β€” go read this one too bestie, it's the whole API family reunion 🌸

2026, dev@trafficserver.apache.org β€” they made this, we're just reading it in the group chat πŸ™ˆ


and that's the tea πŸ“ this page came straight outta 9.2, dated Feb 12, 2026, and yes we are absolutely calling that iconic πŸ’…βœ¨ bye bestie, go check your headers πŸ¦‹πŸ’–

πŸ“¦ where this page comes from