1 .\" $Id: libssh2_session_disconnect_ex.3,v 1.4 2007/06/13 16:41:33 jehousley Exp $
3 .TH libssh2_session_disconnect_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
5 libssh2_session_disconnect_ex - terminate transport layer
10 libssh2_session_disconnect_ex(LIBSSH2_SESSION *session, int reason, const char *description, const char *lang);
13 libssh2_session_disconnect(LIBSSH2_SESSION *session, const char *description);
16 \fIsession\fP - Session instance as returned by
17 .BR libssh2_session_init(3)
19 \fIreason\fP - One of the Disconnect Reason constants.
21 \fIdescription\fP - Human readable reason for disconnection.
23 \fIlang\fP - Localization string describing the langauge/encoding of the description provided.
25 Send a disconnect message to the remote host associated with \fIsession\fP,
26 along with a \fIreason\fP symbol and a verbose \fIdescription\fP.
28 As a convenience, the macro
29 .BR libssh2_session_disconnect(3)
31 .BR libssh2_session_disconnect_ex(3)
32 with \fIreason\fP set to SSH_DISCONNECT_BY_APPLICATION
33 and \fIlang\fP set to an empty string.
36 Return 0 on success or negative on failure. It returns
37 LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
38 LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
40 .BR libssh2_session_init(3)