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

# libressl-SSL\_pending(3)

obtain number of readable bytes buffered in an SSL object

## NAME

**SSL\_pending** – obtain number of readable bytes buffered in an SSL object

## SYNOPSIS

SSL Library (libssl, -lssl) libcrypto

**#include \<openssl/ssl.h\>**

*int*\

**SSL\_pending**(*const SSL \*ssl*);

## DESCRIPTION

Data is received in whole blocks known as records from the peer. A whole record is processed, for example decrypted, in one go and is buffered until it is read by the application via a call to SSL\_read(3).

**SSL\_pending**() returns the number of bytes of application data which are available for immediate read.

**SSL\_pending**() takes into account only bytes from the TLS/SSL record that is currently being processed (if any).

## RETURN VALUES

**SSL\_pending**() returns the number of buffered and processed application data bytes that are pending and are available for immediate read.

## SEE ALSO

[ssl(3)](/ssl/3.md), SSL\_read(3)

## HISTORY

**SSL\_pending**() appeared in SSLeay 0.4 or earlier and has been available since OpenBSD 2.4.

## BUGS

Up to OpenSSL 0.9.6, **SSL\_pending**() did not check if the record type of pending data is application data.
