From 607e5c55e02e2065f7bafa7d1a88e727e7e79972 Mon Sep 17 00:00:00 2001 From: James Housley Date: Wed, 13 Jun 2007 12:50:35 +0000 Subject: [PATCH] Update to reflect the current code and add possible error values --- docs/libssh2_channel_read_ex.3 | 22 ++++++++++++++-------- docs/libssh2_channel_write_ex.3 | 24 ++++++++++++++++-------- 2 files changed, 30 insertions(+), 16 deletions(-) diff --git a/docs/libssh2_channel_read_ex.3 b/docs/libssh2_channel_read_ex.3 index 7df4430..ebe912d 100644 --- a/docs/libssh2_channel_read_ex.3 +++ b/docs/libssh2_channel_read_ex.3 @@ -1,4 +1,4 @@ -.\" $Id: libssh2_channel_read_ex.3,v 1.7 2007/06/08 13:33:08 jehousley Exp $ +.\" $Id: libssh2_channel_read_ex.3,v 1.8 2007/06/13 12:50:35 jehousley Exp $ .\" .TH libssh2_channel_read_ex 3 "1 June 2007" "libssh2 0.15" "libssh2 manual" .SH NAME @@ -6,14 +6,15 @@ libssh2_channel_read_ex - read data from a channel stream .SH SYNOPSIS #include -int libssh2_channel_read_ex(LIBSSH2_CHANNEL *channel, int stream_id, - char *buf, size_t buflen); +ssize_t +libssh2_channel_read_ex(LIBSSH2_CHANNEL *channel, int stream_id, char *buf, size_t buflen); -int libssh2_channel_read(LIBSSH2_CHANNEL *channel, char *buf, - size_t buflen); +ssize_t +libssh2_channel_read(LIBSSH2_CHANNEL *channel, char *buf, size_t buflen); + +ssize_t +libssh2_channel_read_stderr(LIBSSH2_CHANNEL *channel, char *buf, size_t buflen); -int libssh2_channel_read_stderr(LIBSSH2_CHANNEL *channel, char *buf, - size_t buflen); .SH DESCRIPTION Attempt to read data from an active channel stream. All channel streams have one standard I/O substream (stream_id == 0), and may have up to 2^32 extended @@ -34,5 +35,10 @@ macros. Actual number of bytes read or negative on failure. It returns LIBSSH2_ERROR_EAGAIN when it would otherwise block. While LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se. -.SH "SEE ALSO" +.SH ERRORS +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_CHANNEL_CLOSED\fP- The channel has been closed. + +.SH SEE ALSO .BR libssh2_poll_channel_read(3) diff --git a/docs/libssh2_channel_write_ex.3 b/docs/libssh2_channel_write_ex.3 index 0bbc0ff..a76301b 100644 --- a/docs/libssh2_channel_write_ex.3 +++ b/docs/libssh2_channel_write_ex.3 @@ -1,4 +1,4 @@ -.\" $Id: libssh2_channel_write_ex.3,v 1.3 2007/06/08 13:33:08 jehousley Exp $ +.\" $Id: libssh2_channel_write_ex.3,v 1.4 2007/06/13 12:50:35 jehousley Exp $ .\" .TH libssh2_channel_write_ex 3 "1 June 2007" "libssh2 0.15" "libssh2 manual" .SH NAME @@ -6,14 +6,14 @@ libssh2_channel_write_ex - write data to a channel stream blocking .SH SYNOPSIS #include -size_t libssh2_channel_write_ex(LIBSSH2_CHANNEL *channel, int stream_id, - char *buf, size_t buflen); +ssize_t +libssh2_channel_write_ex(LIBSSH2_CHANNEL *channel, int stream_id, char *buf, size_t buflen); -size_t libssh2_channel_write(LIBSSH2_CHANNEL *channel, char *buf, - size_t buflen); +ssize_t +libssh2_channel_write(LIBSSH2_CHANNEL *channel, char *buf, size_t buflen); -size_t libssh2_channel_write_stderr(LIBSSH2_CHANNEL *channel, char *buf, - size_t buflen); +ssize_t +libssh2_channel_write_stderr(LIBSSH2_CHANNEL *channel, char *buf, size_t buflen); .SH DESCRIPTION Write data to a channel stream. All channel streams have one standard I/O substream (stream_id == 0), and may have up to 2^32 extended data streams as @@ -34,6 +34,14 @@ macros. Actual number of bytes written or negative on failure. LIBSSH2_ERROR_EAGAIN when it would otherwise block. While LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se. -.SH "SEE ALSO" +.SH ERRORS +\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed. + +\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. + +\fILIBSSH2_ERROR_CHANNEL_CLOSED\fP - The channel has been closed. + +\fILIBSSH2_ERROR_CHANNEL_EOF_SENT\fP - The channel has been requested to be closed. +.SH SEE ALSO .BR libssh2_channel_open_session(3) .BR libssh2_channel_read(3)