From 6582da1d67ca85a1efd67c4d751295a7a818d34e Mon Sep 17 00:00:00 2001 From: milo Date: Sun, 20 Feb 2011 14:04:56 +0100 Subject: poll: Added function to add an fd to the events. --- include/libssh/libssh.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/libssh') diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h index 2604b41..9dd6b49 100644 --- a/include/libssh/libssh.h +++ b/include/libssh/libssh.h @@ -475,7 +475,12 @@ LIBSSH_API void ssh_string_free_char(char *s); LIBSSH_API int ssh_getpass(const char *prompt, char *buf, size_t len, int echo, int verify); + +typedef int (*ssh_event_callback)(socket_t fd, int revents, void *userdata); + LIBSSH_API ssh_event ssh_event_new(void); +LIBSSH_API int ssh_event_add_fd(ssh_event event, socket_t fd, short events, + ssh_event_callback cb, void *userdata); LIBSSH_API int ssh_event_add_session(ssh_event event, ssh_session session); LIBSSH_API int ssh_event_remove_session(ssh_event event, ssh_session session); LIBSSH_API void ssh_event_free(ssh_event event); -- cgit