geom_gate userland utility improvements
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

39 lines
1.3 KiB

  1. .TH libssh2_session_disconnect_ex 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
  2. .SH NAME
  3. libssh2_session_disconnect_ex - terminate transport layer
  4. .SH SYNOPSIS
  5. #include <libssh2.h>
  6. int
  7. libssh2_session_disconnect_ex(LIBSSH2_SESSION *session, int reason, const char *description, const char *lang);
  8. int
  9. libssh2_session_disconnect(LIBSSH2_SESSION *session, const char *description);
  10. .SH DESCRIPTION
  11. \fIsession\fP - Session instance as returned by
  12. .BR libssh2_session_init_ex(3)
  13. \fIreason\fP - One of the Disconnect Reason constants.
  14. \fIdescription\fP - Human readable reason for disconnection.
  15. \fIlang\fP - Localization string describing the language/encoding of the description provided.
  16. Send a disconnect message to the remote host associated with \fIsession\fP,
  17. along with a \fIreason\fP symbol and a verbose \fIdescription\fP.
  18. As a convenience, the macro
  19. .BR libssh2_session_disconnect(3)
  20. is provided. It calls
  21. .BR libssh2_session_disconnect_ex(3)
  22. with \fIreason\fP set to SSH_DISCONNECT_BY_APPLICATION
  23. and \fIlang\fP set to an empty string.
  24. .SH RETURN VALUE
  25. Return 0 on success or negative on failure. It returns
  26. LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
  27. LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
  28. .SH SEE ALSO
  29. .BR libssh2_session_init_ex(3)