44 lines · 1.8 KB · Text
RawDownload
.TH libssh2_session_callback_set 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual".SH NAMElibssh2_session_callback_set - set a callback function.SH SYNOPSIS.nf#include <libssh2.h> void *libssh2_session_callback_set(LIBSSH2_SESSION *session,                                   int cbtype, void *callback);.SH DESCRIPTIONSets a custom callback handler for a previously initialized sessionobject. Callbacks are triggered by the receipt of special packets at theTransport layer. To disable a callback, set it to NULL. \fIsession\fP - Session instance as returned by .BR libssh2_session_init_ex(3) \fIcbtype\fP - Callback type. One of the types listed in Callback Types. \fIcallback\fP - Pointer to custom callback function. The prototype for this function must match the associated callback declaration macro..SH CALLBACK TYPES.IP LIBSSH2_CALLBACK_IGNORECalled when a SSH_MSG_IGNORE message is received.IP LIBSSH2_CALLBACK_DEBUGCalled when a SSH_MSG_DEBUG message is received.IP LIBSSH2_CALLBACK_DISCONNECTCalled when a SSH_MSG_DISCONNECT message is received.IP LIBSSH2_CALLBACK_MACERRORCalled when a mismatched MAC has been detected in the transport layer. If thefunction returns 0, the packet will be accepted nonetheless..IP LIBSSH2_CALLBACK_X11Called when an X11 connection has been accepted.IP LIBSSH2_CALLBACK_SENDCalled when libssh2 wants to send some data on the connection.Can be set to a custom function to handle I/O your own way..IP LIBSSH2_CALLBACK_RECVCalled when libssh2 wants to receive some data from the connection.Can be set to a custom function to handle I/O your own way..SH RETURN VALUEPointer to previous callback handler. Returns NULL if no prior callbackhandler was set or the callback type was unknown..SH SEE ALSO.BR libssh2_session_init_ex(3)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t