diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2011-10-13 22:23:48 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2011-10-13 22:23:48 +0200 |
commit | 551a0c855b689cb959ff2a6ad2f5fcb1bba407d0 (patch) | |
tree | fde913d0723e720a90c4f16d0921891c0a5be8ba /include | |
parent | 85cc582d4a2d9de68957d6d49cdad836c494d404 (diff) | |
download | libssh-551a0c855b689cb959ff2a6ad2f5fcb1bba407d0.tar.gz libssh-551a0c855b689cb959ff2a6ad2f5fcb1bba407d0.tar.xz libssh-551a0c855b689cb959ff2a6ad2f5fcb1bba407d0.zip |
server: ssh_bind_accept_fd
This function will not call accept() but use function parameter
instead
Diffstat (limited to 'include')
-rw-r--r-- | include/libssh/server.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/libssh/server.h b/include/libssh/server.h index af57f2f3..9ad53e42 100644 --- a/include/libssh/server.h +++ b/include/libssh/server.h @@ -225,6 +225,21 @@ LIBSSH_API void ssh_bind_fd_toaccept(ssh_bind ssh_bind_o); LIBSSH_API int ssh_bind_accept(ssh_bind ssh_bind_o, ssh_session session); /** + * @brief Accept an incoming ssh connection on the given file descriptor + * and initialize the session. + * + * @param ssh_bind_o The ssh server bind to accept a connection. + * @param session A preallocated ssh session + * @param fd A file descriptor of an already established TCP + * inbound connection + * @see ssh_new + * @see ssh_bind_accept + * @return SSH_OK when a connection is established + */ +LIBSSH_API int ssh_bind_accept_fd(ssh_bind ssh_bind_o, ssh_session session, + socket_t fd); + +/** * @brief Handles the key exchange and set up encryption * * @param session A connected ssh session |