From d86f0017545f0076a1136b5c6f8b0a7a58366342 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Tue, 25 Oct 2005 23:02:25 +0000 Subject: channel_select(). this function rocks ! I adapted the sample.c file. the select_loop function is bloated and fails to demonstrate how libssh is simple to handle... it looks to run at first try. git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@39 7dcaeef0-15fb-0310-b436-a5af3365683c --- include/libssh/libssh.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h index f49b3f5..5f8765f 100644 --- a/include/libssh/libssh.h +++ b/include/libssh/libssh.h @@ -110,6 +110,10 @@ SSH_SESSION *ssh_new(); void ssh_set_options(SSH_SESSION *session, SSH_OPTIONS *options); int ssh_get_fd(SSH_SESSION *session); void ssh_silent_disconnect(SSH_SESSION *session); +void ssh_set_fd_toread(SSH_SESSION *session); +void ssh_set_fd_towrite(SSH_SESSION *session); +void ssh_set_fd_except(SSH_SESSION *session); + /* client.c */ int ssh_connect(SSH_SESSION *session); @@ -185,6 +189,9 @@ int channel_poll(CHANNEL *channel, int is_stderr); int channel_close(CHANNEL *channel); int channel_read_nonblocking(CHANNEL *channel, char *dest, int len, int is_stderr); int channel_is_open(CHANNEL *channel); +int channel_is_closed(CHANNEL *channel); +int channel_select(CHANNEL **readchans, CHANNEL **writechans, CHANNEL **exceptchans, struct + timeval * timeout); /* in options.c */ SSH_OPTIONS *ssh_options_new(); -- cgit