1 .\" $Id: libssh2_session_startup.3,v 1.6 2007/06/13 16:41:33 jehousley Exp $
3 .TH libssh2_session_startup 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
5 libssh2_session_startup - begin transport layer
10 libssh2_session_startup(LIBSSH2_SESSION *session, int socket);
13 \fIsession\fP - Session instance as returned by
14 .BR libssh2_session_init(3)
16 \fIsocket\fP - Connected socket descriptor. Typically a TCP connection
17 though the protocol allows for any reliable transport and the library will
18 attempt to use any berkeley socket.
20 Begin transport layer protocol negotiation with the connected host.
22 Returns 0 on success, negative on failure.
24 \fILIBSSH2_ERROR_SOCKET_NONE\fP - The socket is invalid.
26 \fILIBSSH2_ERROR_BANNER_SEND\fP - Unable to send banner to remote host.
28 \fILIBSSH2_ERROR_KEX_FAILURE\fP - >Encryption key exchange with the remote
31 \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
33 \fILIBSSH2_ERROR_SOCKET_DISCONNECT\fP - The socket was disconnected.
35 \fILIBSSH2_ERROR_PROTO\fP - An invalid SSH protocol response was received on
38 \fILIBSSH2_ERROR_EAGAIN\fP - Marked for non-blocking I/O but the call would block.
41 .BR libssh2_session_free(3)
42 .BR libssh2_session_init(3)