TSHTTPTXNISWEBSOCKET(3ts)
π 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 πΈ
π COPYRIGHT π
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
- ubuntu noble: trafficserver-dev 9.2.3+ds-1+deb12u1ubuntu0.1 Β· Apache-2.0
- 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