---
name: "TSHttpTxnIsWebsocket"
section: "3ts"
platform: "linux"
package: "trafficserver-dev"
version: "9.2.5+ds-0+deb12u4"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/TSHttpTxnIsWebsocket"
---

# TSHttpTxnIsWebsocket(3ts)

test whether a request is attempting to initiate Websocket connection

## NAME

TSHttpTxnIsWebsocket - test whether a request is attempting to initiate Websocket connection

## SYNOPSIS

```
#include <ts/ts.h>
```

- **int TSHttpTxnIsWebsocket(*TSHttpTxn* txnp)**

  ## DESCRIPTION

*TSHttpTxnIsWebsocket()* tests whether the transaction is a WebSocket upgrade request.

## RETURN VALUES

A non-zero value is returned if the relevant header value is found.

## SEE ALSO

**[TSAPI(3ts)](/TSAPI/3ts.md)**

## COPYRIGHT

2026, dev@trafficserver.apache.org
