1
1

libssh2_session_callback_set: extended the man page

Этот коммит содержится в:
Daniel Stenberg 2010-06-16 00:12:24 +02:00
родитель 6ddcc493e8
Коммит 537a00ee4b

Просмотреть файл

@ -4,12 +4,16 @@
.SH NAME .SH NAME
libssh2_session_callback_set - set a callback function libssh2_session_callback_set - set a callback function
.SH SYNOPSIS .SH SYNOPSIS
.nf
#include <libssh2.h> #include <libssh2.h>
void * void *libssh2_session_callback_set(LIBSSH2_SESSION *session,
libssh2_session_callback_set(LIBSSH2_SESSION *session, int cbtype, void *callback); int cbtype, void *callback);
.SH DESCRIPTION .SH DESCRIPTION
Sets a custom callback handler for a previously initialized session
object. Callbacks are triggered by the receipt of special packets at the
Transport layer. To disable a callback, set it to NULL.
\fIsession\fP - Session instance as returned by \fIsession\fP - Session instance as returned by
.BR libssh2_session_init_ex(3) .BR libssh2_session_init_ex(3)
@ -17,14 +21,19 @@ libssh2_session_callback_set(LIBSSH2_SESSION *session, int cbtype, void *callbac
\fIcallback\fP - Pointer to custom callback function. The prototype for \fIcallback\fP - Pointer to custom callback function. The prototype for
this function must match the associated callback declaration macro. this function must match the associated callback declaration macro.
.SH CALLBACK TYPES
Sets a custom callback handler for a previously initialized session .IP LIBSSH2_CALLBACK_IGNORE
object. Callbacks are triggered by the receipt of special packets at Called when a SSH_MSG_IGNORE message is received
the Transport layer. To disable a callback, set it to NULL. .IP LIBSSH2_CALLBACK_DEBUG
Called when a SSH_MSG_DEBUG message is received
.IP LIBSSH2_CALLBACK_DISCONNECT
Called when a SSH_MSG_DISCONNECT message is received
.IP LIBSSH2_CALLBACK_MACERROR
Called when a mismatched MAC has been detected in the transport layer
.IP LIBSSH2_CALLBACK_X11
Called when an X11 connection has been accepted
.SH RETURN VALUE .SH RETURN VALUE
Pointer to previous callback handler. Returns NULL if no Pointer to previous callback handler. Returns NULL if no prior callback
prior callback handler was set. handler was set or the callback type was unknown.
.SH SEE ALSO .SH SEE ALSO
.BR libssh2_session_init_ex(3) .BR libssh2_session_init_ex(3)