Libssh2 session startup

From Libssh2

int libssh2_session_startup(LIBSSH2_SESSION *session, int socket);

About

Begin transport layer protocol negotiation with the connected host.

Parameters

  • session
    Session instance as returned by libssh2_session_init().
  • socket
    Connected socket descriptor. Typically a TCP connection though the protocol allows for any reliable transport and the library will attempt to use any berkeley socket.

Returns

  • On Success: 0
  • On Failure: -1