libssh2\_session\_block\_directions(3) libssh2 libssh2\_session\_block\_directions(3)

# [NAME](#NAME)

libssh2\_session\_block\_directions - get directions to wait for

# [SYNOPSIS](#SYNOPSIS)

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

# [DESCRIPTION](#DESCRIPTION)

*session* - Session instance as returned by [**libssh2\_session\_init\_ex(3)**](/man/os/libssh2/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)*](/man/os/libssh2/libssh2_session_block_directions.3) an application should wait for read, write or both.

# [RETURN VALUE](#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.

# [AVAILABILITY](#AVAILABILITY)

Added in 1.0

1 Oct 2008 libssh2

---

Document: libssh2_session_block_directions(3) from libssh2 1.11.1-r11 (Chainguard OS)
Source: https://github.com/libssh2/libssh2.git
