aboutsummaryrefslogtreecommitdiff
path: root/include/libssh
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2011-01-12 23:04:43 +0100
committerAris Adamantiadis <aris@0xbadc0de.be>2011-01-12 23:04:43 +0100
commit5b6f048197a56d0b45ad642431f2b5ee718c53e9 (patch)
tree877882858e7d6301dc7e660eef9e2dbbdddc8bed /include/libssh
parenta17472ff2b723059841d194c19ad65b0d76b7860 (diff)
downloadlibssh-5b6f048197a56d0b45ad642431f2b5ee718c53e9.tar.gz
libssh-5b6f048197a56d0b45ad642431f2b5ee718c53e9.tar.xz
libssh-5b6f048197a56d0b45ad642431f2b5ee718c53e9.zip
Use termination functions for event polling
Diffstat (limited to 'include/libssh')
-rw-r--r--include/libssh/session.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/libssh/session.h b/include/libssh/session.h
index 55eabcdd..3bbd0a8a 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_ */