1libssh2_session_disconnect_ex(3)    libssh2   libssh2_session_disconnect_ex(3)
2
3
4

NAME

6       libssh2_session_disconnect_ex - terminate transport layer
7

SYNOPSIS

9       #include <libssh2.h>
10
11       int
12       libssh2_session_disconnect_ex(LIBSSH2_SESSION *session, int reason,
13                                     const char *description,
14                                     const char *lang);
15
16       int
17       libssh2_session_disconnect(LIBSSH2_SESSION *session,
18                                  const char *description);
19

DESCRIPTION

21       session - Session instance as returned by libssh2_session_init_ex(3)
22
23       reason - One of the Disconnect Reason constants.
24
25       description - Human readable reason for disconnection.
26
27       lang  - Localization string describing the language/encoding of the de‐
28       scription provided.
29
30       Send a disconnect message to the remote host associated  with  session,
31       along with a reason symbol and a verbose description.
32
33       As  a convenience, the macro libssh2_session_disconnect(3) is provided.
34       It calls libssh2_session_disconnect_ex(3) with reason set  to  SSH_DIS‐
35       CONNECT_BY_APPLICATION and lang set to an empty string.
36

RETURN VALUE

38       Return  0  on  success  or negative on failure.  It returns LIBSSH2_ER‐
39       ROR_EAGAIN when it would otherwise block. While LIBSSH2_ERROR_EAGAIN is
40       a negative number, it is not really a failure per se.
41

SEE ALSO

43       libssh2_session_init_ex(3)
44
45
46
47libssh2 0.15                      1 Jun 2007  libssh2_session_disconnect_ex(3)
Impressum