libssh2_session_block_directions(3)

libssh2_session_block_directions3

Get directions to wait for

Usage

#include <libssh2.h>
int
libssh2_session_block_directions(LIBSSH2_SESSION *session);

Overview

session - Session instance as returned by libssh2_session_init_ex(3)

When any of libssh2 functions return LIBSSH2_ERROR_EAGAIN an application should wait for the socket to have data available for reading or writing. Depending on the return value of libssh2_session_block_directions(3) an application should wait for read, write or both.

Return value

Returns the set of directions as a binary mask. Can be a combination of:

LIBSSH2_SESSION_BLOCK_INBOUND: Inbound direction blocked.

LIBSSH2_SESSION_BLOCK_OUTBOUND: Outbound direction blocked.

Application should wait for data to be available for socket prior to calling a libssh2 function again. If LIBSSH2_SESSION_BLOCK_INBOUND is set select should contain the session socket in readfds set. Correspondingly in case of LIBSSH2_SESSION_BLOCK_OUTBOUND writefds set should contain the socket.

Releases

9 releases since Debian 6.0 (Squeeze); the text changed 2 times.

  1. 6.0
  2. 7–12
  3. 13–Arch

Availability

Added in 1.0

From libssh2 1.11.1-7 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.