]> src.bluestatic.org Git - printdrop.git/blob - man3/libssh2_session_disconnect_ex.3
Add a help menu item to display the current print queue
[printdrop.git] / man3 / libssh2_session_disconnect_ex.3
1 .\" $Id: libssh2_session_disconnect_ex.3,v 1.4 2007/06/13 16:41:33 jehousley Exp $
2 .\"
3 .TH libssh2_session_disconnect_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
4 .SH NAME
5 libssh2_session_disconnect_ex - terminate transport layer
6 .SH SYNOPSIS
7 #include <libssh2.h>
8
9 int
10 libssh2_session_disconnect_ex(LIBSSH2_SESSION *session, int reason, const char *description, const char *lang);
11
12 int
13 libssh2_session_disconnect(LIBSSH2_SESSION *session, const char *description);
14
15 .SH DESCRIPTION
16 \fIsession\fP - Session instance as returned by
17 .BR libssh2_session_init(3)
18
19 \fIreason\fP - One of the Disconnect Reason constants.
20
21 \fIdescription\fP - Human readable reason for disconnection.
22
23 \fIlang\fP - Localization string describing the langauge/encoding of the description provided.
24
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.
27
28 As a convenience, the macro
29 .BR libssh2_session_disconnect(3)
30 is provided. It calls
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.
34
35 .SH RETURN VALUE
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.
39 .SH SEE ALSO
40 .BR libssh2_session_init(3)