diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-05-04 10:06:49 +0000 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-05-04 10:06:49 +0000 |
commit | 152da0702351dce04b62999aa98efc57fbda4489 (patch) | |
tree | 99a98d1ee0b4e29d9c6616c9cbe0496ae837487a /include/libssh | |
parent | dda7808851079f75042fd73850adb336eb53c8e8 (diff) | |
download | libssh-152da0702351dce04b62999aa98efc57fbda4489.tar.gz libssh-152da0702351dce04b62999aa98efc57fbda4489.tar.xz libssh-152da0702351dce04b62999aa98efc57fbda4489.zip |
Implement channel_read() as a POSIX like function.
Create channel_read_buffer() to have the old version still available.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@700 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'include/libssh')
-rw-r--r-- | include/libssh/libssh.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h index 828655ee..4567e049 100644 --- a/include/libssh/libssh.h +++ b/include/libssh/libssh.h @@ -281,11 +281,14 @@ int channel_request_sftp(CHANNEL *channel); int channel_write(CHANNEL *channel, const void *data, u32 len); int channel_send_eof(CHANNEL *channel); int channel_is_eof(CHANNEL *channel); -int channel_read(CHANNEL *channel, BUFFER *buffer, u32 bytes, int is_stderr); +int channel_read(CHANNEL *channel, void *dest, u32 count, int is_stderr); +int channel_read_buffer(CHANNEL *channel, BUFFER *buffer, u32 count, + int is_stderr); int channel_poll(CHANNEL *channel, int is_stderr); int channel_close(CHANNEL *channel); void channel_set_blocking(CHANNEL *channel, int blocking); -int channel_read_nonblocking(CHANNEL *channel, char *dest, u32 len, int is_stderr); +int channel_read_nonblocking(CHANNEL *channel, void *dest, u32 count, + 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 |