1libssh2_session_disconnect_ex(3)libssh2 manuallibssh2_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 libssh2_session_disconnect_ex(LIBSSH2_SESSION *session, int reason,
12       const char *description, const char *lang);
13
14       int  libssh2_session_disconnect(LIBSSH2_SESSION  *session,  const  char
15       *description);
16
17

DESCRIPTION

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

RETURN VALUE

37       Return   0  on  success  or  negative  on  failure.   It  returns  LIB‐
38       SSH2_ERROR_EAGAIN  when  it   would   otherwise   block.   While   LIB‐
39       SSH2_ERROR_EAGAIN  is  a negative number, it isn't really a failure per
40       se.
41

SEE ALSO

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