diff options
author | Colin Walters <walters@verbum.org> | 2013-11-06 14:11:52 -0500 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2013-11-09 12:26:19 +0100 |
commit | 4cc7f4ad036b75d7a3cd9f0d39d8978ccb399b96 (patch) | |
tree | 2fe7e3d53e688c41558b7fb01efea6b40908e677 /include | |
parent | a8dc67ded863716c3b8cfa02739a73acecaea41c (diff) | |
download | libssh-4cc7f4ad036b75d7a3cd9f0d39d8978ccb399b96.tar.gz libssh-4cc7f4ad036b75d7a3cd9f0d39d8978ccb399b96.tar.xz libssh-4cc7f4ad036b75d7a3cd9f0d39d8978ccb399b96.zip |
Add ssh_get_poll_flags()
For integration with an external mainloop, we need to know how to
replicate libssh's internal poll() calls. We originally through
ssh_get_status() was that API, but it's not really - those flags only
get updated from the *result* of a poll(), where what we really need
is to know how libssh would *start* a poll().
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/libssh/libssh.h | 1 | ||||
-rw-r--r-- | include/libssh/socket.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h index 3833adc..f1b9fd8 100644 --- a/include/libssh/libssh.h +++ b/include/libssh/libssh.h @@ -429,6 +429,7 @@ SSH_DEPRECATED LIBSSH_API int ssh_get_pubkey_hash(ssh_session session, unsigned LIBSSH_API int ssh_get_random(void *where,int len,int strong); LIBSSH_API int ssh_get_version(ssh_session session); LIBSSH_API int ssh_get_status(ssh_session session); +LIBSSH_API int ssh_get_poll_flags(ssh_session session); LIBSSH_API int ssh_init(void); LIBSSH_API int ssh_is_blocking(ssh_session session); LIBSSH_API int ssh_is_connected(ssh_session session); diff --git a/include/libssh/socket.h b/include/libssh/socket.h index 285a02e..8e1eac2 100644 --- a/include/libssh/socket.h +++ b/include/libssh/socket.h @@ -52,6 +52,7 @@ void ssh_socket_set_write_wontblock(ssh_socket s); void ssh_socket_set_read_wontblock(ssh_socket s); void ssh_socket_set_except(ssh_socket s); int ssh_socket_get_status(ssh_socket s); +int ssh_socket_get_poll_flags(ssh_socket s); int ssh_socket_buffered_write_bytes(ssh_socket s); int ssh_socket_data_available(ssh_socket s); int ssh_socket_data_writable(ssh_socket s); |