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
This commit is contained in:
Aris Adamantiadis
2005-10-25 23:02:25 +00:00
parent 5f7c84f900
commit d86f001754
5 changed files with 219 additions and 33 deletions

View File

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