diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-12-18 23:56:59 +0100 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-12-18 23:56:59 +0100 |
commit | a1870a62cffc8c09acf56a33dbf0a55238829b58 (patch) | |
tree | 68fb3a644ffd442175559497276c1acd2c44d573 /include | |
parent | 98819f92e342bad3553cd956fbc100eac92384a4 (diff) | |
download | libssh-a1870a62cffc8c09acf56a33dbf0a55238829b58.tar.gz libssh-a1870a62cffc8c09acf56a33dbf0a55238829b58.tar.xz libssh-a1870a62cffc8c09acf56a33dbf0a55238829b58.zip |
Documentation callbacks.h + standardization
Diffstat (limited to 'include')
-rw-r--r-- | include/libssh/callbacks.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/include/libssh/callbacks.h b/include/libssh/callbacks.h index ab63cf68..d5a3745f 100644 --- a/include/libssh/callbacks.h +++ b/include/libssh/callbacks.h @@ -122,11 +122,27 @@ typedef struct ssh_callbacks_struct *ssh_callbacks; * They are called by the socket module when a socket event appears */ struct ssh_socket_callbacks_struct { + /** + * User-provided data. User is free to set anything he wants here + */ + void *userdata; + /** + * This function will be called each time data appears on socket. The data + * not consumed will appear on the next data event. + */ ssh_callback_data data; + /** This function will be called each time a controlflow state changes, i.e. + * the socket is available for reading or writing. + */ ssh_callback_int controlflow; + /** This function will be called each time an exception appears on socket. An + * exception can be a socket problem (timeout, ...) or an end-of-file. + */ ssh_callback_int_int exception; + /** This function is called when the ssh_socket_connect was used on the socket + * on nonblocking state, and the connection successed. + */ ssh_callback_int_int connected; - void *user; }; typedef struct ssh_socket_callbacks_struct *ssh_socket_callbacks; @@ -186,8 +202,12 @@ struct ssh_packet_callbacks_struct { uint8_t n_callbacks; /** A pointer to n_callbacks packet callbacks */ ssh_packet_callback *callbacks; + /** + * User-provided data. User is free to set anything he wants here + */ void *user; }; + typedef struct ssh_packet_callbacks_struct *ssh_packet_callbacks; /** |