Libssh2 session disconnect ex
From Libssh2
int libssh2_session_disconnect_ex(LIBSSH2_SESSION *session, int reason, const char *description, const char *lang); #define libssh2_session_disconnect(session, description) libssh2_session_disconnect_ex((session), SSH_DISCONNECT_BY_APPLICATION, (description), "")
[edit]
About
Terminates the transport layer connection with the remote host. Note that all authentication and connection layer objects become unusable at this point and should be explicitly freed prior to disconnection.
[edit]
Parameters
- session
- Session instance as returned by libssh2_session_init().
- reason
- One of the Disconnect Reason constants.
- description
- Human readable reason for disconnection.
- lang
- Localization string describing the langauge/encoding of the description provided.
[edit]
Returns
- On Success: 0
- On Failure: -1
