1libssh2_sftp_write(3)           libssh2 manual           libssh2_sftp_write(3)
2
3
4

NAME

6       libssh2_sftp_write - write SFTP data
7

SYNOPSIS

9       #include <libssh2.h> #include <libssh2_sftp.h>
10
11       ssize_t   libssh2_sftp_write(LIBSSH2_SFTP_HANDLE  *handle,  const  char
12       *buffer, size_t count);
13
14

DESCRIPTION

16       handle - SFTP file handle as returned by libssh2_sftp_open_ex(3).
17
18       buffer - points to the data to send off
19
20       count - Number of bytes from 'buffer' to write. Note that it may not be
21       possible to write all bytes as requested.
22
23       libssh2_sftp_write(3)  writes  a block of data to the SFTP server. This
24       method is modeled after the POSIX write() function and  uses  the  same
25       calling semantics.
26

RETURN VALUE

28       Actual number of bytes written or negative on failure.
29
30       If  used  in non-blocking mode, it returns LIBSSH2_ERROR_EAGAIN when it
31       would otherwise block. While LIBSSH2_ERROR_EAGAIN is a negative number,
32       it isn't really a failure per se.
33
34       If this function returns 0 (zero) it should not be considered an error,
35       but simply that there was no error but yet no payload data got sent  to
36       the other end.
37

ERRORS

39       LIBSSH2_ERROR_ALLOC -  An internal memory allocation call failed.
40
41       LIBSSH2_ERROR_SOCKET_SEND - Unable to send data on socket.
42
43       LIBSSH2_ERROR_SOCKET_TIMEOUT -
44
45       LIBSSH2_ERROR_SFTP_PROTOCOL  -  An  invalid  SFTP protocol response was
46       received on the socket, or an SFTP operation caused an errorcode to  be
47       returned by the server.
48

SEE ALSO

50       libssh2_sftp_open_ex(3)
51
52
53
54libssh2 0.15                      1 Jun 2007             libssh2_sftp_write(3)
Impressum