---
name: "TSHttpConnect"
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/TSHttpConnect"
---

# TSHttpConnect(3ts)

TSHttpConnect API function

## NAME

TSHttpConnect - TSHttpConnect API function

## SYNOPSIS

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

- ***TSVConn* TSHttpConnect(sockaddr const \*addr)**

  ## DESCRIPTION

Allows the plugin to initiate an HTTP connection.

The *TSVConn* the plugin receives as the result of successful operates identically to one created through *TSNetConnect*. Aside from allowing the plugin to set the client ip and port for logging, the functionality of *TSHttpConnect()* is identical to connecting to localhost on the proxy port with *TSNetConnect()*. *TSHttpConnect()* is more efficient than *TSNetConnect()* to localhost since it avoids the overhead of passing the data through the operating system.

## COPYRIGHT

2026, dev@trafficserver.apache.org
