libssh2_channel_close.3 (1004B)
1.TH libssh2_channel_close 3 "1 Jun 2007" "libssh2 0.15" "libssh2" 2.SH NAME 3libssh2_channel_close - close a channel 4.SH SYNOPSIS 5.nf 6#include <libssh2.h> 7 8int 9libssh2_channel_close(LIBSSH2_CHANNEL *channel); 10.fi 11.SH DESCRIPTION 12\fIchannel\fP - active channel stream to set closed status on. 13 14Close an active data channel. In practice this means sending an SSH_MSG_CLOSE 15packet to the remote host which serves as instruction that no further data 16will be sent to it. The remote host may still send data back until it sends 17its own close message in response. To wait for the remote end to close its 18connection as well, follow this command with 19.BR libssh2_channel_wait_closed(3) 20.SH RETURN VALUE 21Return 0 on success or negative on failure. It returns 22LIBSSH2_ERROR_EAGAIN when it would otherwise block. While 23LIBSSH2_ERROR_EAGAIN is a negative number, it is not really a failure per se. 24.SH ERRORS 25\fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket. 26.SH SEE ALSO 27.BR libssh2_channel_open_ex(3)