From 5b6f048197a56d0b45ad642431f2b5ee718c53e9 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Wed, 12 Jan 2011 23:04:43 +0100 Subject: Use termination functions for event polling --- include/libssh/session.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include/libssh') diff --git a/include/libssh/session.h b/include/libssh/session.h index 55eabcd..3bbd0a8 100644 --- a/include/libssh/session.h +++ b/include/libssh/session.h @@ -158,8 +158,15 @@ struct ssh_session_struct { char *ProxyCommand; }; +/** @internal + * @brief a termination function evaluates the status of an object + * @param user[in] object to evaluate + * @returns 1 if the polling routine should terminate, 0 instead + */ +typedef int (*ssh_termination_function)(void *user); int ssh_handle_packets(ssh_session session, int timeout); - +int ssh_handle_packets_termination(ssh_session session, int timeout, + ssh_termination_function fct, void *user); void ssh_socket_exception_callback(int code, int errno_code, void *user); #endif /* SESSION_H_ */ -- cgit