1 .\" $Id: libssh2_sftp_init.3,v 1.6 2007/06/13 16:41:33 jehousley Exp $
3 .TH libssh2_sftp_init 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
8 #include <libssh2_sftp.h>
11 libssh2_sftp_init(LIBSSH2_SESSION *session);
14 \fIsession\fP - Session instance as returned by
15 .BR libssh2_session_init(3)
17 Open a channel and initialize the SFTP subsystem. Although the SFTP subsystem
18 operates over the same type of channel as those exported by the Channel API,
19 the protocol itself implements its own unique binary packet protocol which
20 must be managed with the libssh2_sftp_*() family of functions. When an SFTP
21 session is complete, it must be destroyed using the
22 .BR libssh2_sftp_shutdown(3)
25 A pointer to the newly allocated SFTP instance or NULL on failure.
27 \fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
29 \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
31 \fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
33 \fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
34 received on the socket, or an SFTP operation caused an errorcode to be
35 returned by the server.
37 \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block.
40 .BR libssh2_sftp_shutdown(3)
41 .BR libssh2_sftp_open_ex(3)