33 строки
1.3 KiB
Groff
33 строки
1.3 KiB
Groff
|
.\" $Id: libssh2_session_block_directions.3,v 1.1 2008/11/27 12:19:43 bagder Exp $
|
||
|
.\"
|
||
|
.TH libssh2_session_block_directions 3 "1 Oct 2008" "libssh2 0.19" "libssh2 manual"
|
||
|
.SH NAME
|
||
|
libssh2_session_block_directions - get directions that socket should wait for before calling libssh2 function again
|
||
|
.SH SYNOPSIS
|
||
|
#include <libssh2.h>
|
||
|
|
||
|
int
|
||
|
libssh2_session_block_directions(LIBSSH2_SESSION *session);
|
||
|
|
||
|
.SH DESCRIPTION
|
||
|
\fIsession\fP - Session instance as returned by
|
||
|
.BR libssh2_session_init(3)
|
||
|
|
||
|
When any of libssh2 functions return \fBLIBSSH2_ERROR_EAGAIN\fP an application
|
||
|
should wait for the socket to have data available for reading or
|
||
|
writing. Depending on the return value of
|
||
|
\fIlibssh2_session_block_directions(3)\fP an application should wait for read,
|
||
|
write or both.
|
||
|
|
||
|
.SH 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 \fBLIBSSH2_SESSION_BLOCK_INBOUND\fP is set select
|
||
|
should contain the session socket in readfds set. Correspondingly in case of
|
||
|
\fBLIBSSH2_SESSION_BLOCK_INBOUND\fP writefds set should contain the socket.
|