1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-10-26 02:17:35 +03:00
Files
libssh2/docs/libssh2_session_block_directions.md
Viktor Szakats b889b39945 docs: convert man page sources to "curldown" format
To render in Git webviews as-is, to make it easier to edit, verify,
and to sync up with curl.

- add options to not build the `.3` man pages:
  - autotools: `--disable-docs`
  - cmake: `LIBSSH2_BUILD_DOCS=OFF`
- building `.3` man pages requires Perl after this patch.
- drop `mansyntax` and the shell / `grep` / GNU `man` tool requirements with it.
- scripts and most logic were copied from curl.
- add `cd2nroff` from curl, with edits to relax curl-specific checks.
- used `nroff2cd` (from curl) to convert from `.3` to `.md`. Then
  manually fixed copyrights, inline function references and a couple
  of other things.

Credits-to: Daniel Stenberg

Ref: eefcc1bda4
Ref: https://github.com/curl/curl/pull/12730
Ref: https://github.com/libssh2/www/issues/25#issuecomment-3289431671

Closes #1660
2025-10-09 04:05:38 +02:00

49 lines
1.2 KiB
Markdown

---
c: Copyright (C) The libssh2 project and its contributors.
SPDX-License-Identifier: BSD-3-Clause
Title: libssh2_session_block_directions
Section: 3
Source: libssh2
See-also:
---
# NAME
libssh2_session_block_directions - get directions to wait for
# SYNOPSIS
~~~c
#include <libssh2.h>
int
libssh2_session_block_directions(LIBSSH2_SESSION *session);
~~~
# DESCRIPTION
*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.
# AVAILABILITY
Added in 1.0