---
name: "tlsrpt_close"
section: "3"
platform: "linux"
package: "libtlsrpt"
version: "0.5.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/tlsrpt_close"
---

# tlsrpt\_close(3)

\`tlsrpt\_close\` closes the tlsrpt\_connetion\_t object

## NAME

tlsrpt\_close - \`tlsrpt\_close\` closes the tlsrpt\_connetion\_t object

## SYNOPSIS

\#include \<tlsrpt.h\>

int tlsrpt\_close(struct tlsrpt\_connection\_t\*\* pcon)

## DESCRIPTION

The function `tlsrpt_close` closes the tlsrpt\_connetion\_t object. `tlsrpt_close` closes the socket, resets the destination socket address to all zero bytes, deallocates the `struct tlsrpt_connection_t` and sets \*pcon to `NULL`.

## RETURN VALUE

The tlsrpt\_close function returns 0 on success and a combined error code on failure. The combined error code can be analyzed with the *tlsrpt\_strerror* function.

## SEE ALSO

man:tlsrpt\_open\[3\], man:tlsrpt\_strerror\[3\], man:tlsrpt\_error\_code\_is\_internal\[3\]

## AUTHOR

Boris Lohner
