poll: Added function to add an fd to the events.

This commit is contained in:
milo
2011-02-20 14:04:56 +01:00
parent 0c76156f54
commit 6582da1d67
2 changed files with 69 additions and 0 deletions

View File

@@ -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);