limb 0.2.0

2024-01-09

buffer_len(3)
limb manual
buffer_len(3)

NAME

buffer_len, buffer_getlen - get used/available length of an I/O buffer

SYNOPSIS

#include <limb/buffer.h>
size_t buffer_len(buffer *buf)
size_t buffer_getlen(buffer *buf)

size_t buffer_available(buffer *buf)

DESCRIPTION

The buffer_len() macro returns the amount of data currently in the internal memory of the buffer pointed by buf, i.e. either read or not yet flushed to its associated file descriptor.

The buffer_getlen() function is similar, but as a function.

The buffer_available() macro returns the amount of space available in the internal memory of the buffer pointed by buf.

RETURN VALUE

The buffer_len() and buffer_getlen() functions return the amount of data currently in the buffer pointed by buf.

The buffer_available() macro returns the amount of space available in the internal memory of the buffer pointed by buf.

limb 0.1.0
2023-07-24
buffer_len(3)