libssh2_channel_forward_accept(3)

πŸ“¦
version 1.11.1 Β· 3 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, debian trixie, epel 10, epel 9, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– libssh2_channel_forward_accept β€” accept a queued connection πŸ’–

okay bestie, welcome to the libssh2 manual, this one's about libssh2_channel_forward_accept and it's literally the moment your listener finally gets a caller πŸŽ€


✨ NAME ✨

libssh2_channel_forward_accept β€” accept a queued connection 🫢


🌸 SYNOPSIS 🌸

#include <libssh2.h>

LIBSSH2_CHANNEL *
libssh2_channel_forward_accept(LIBSSH2_LISTENER *listener);

πŸ¦‹ DESCRIPTION πŸ¦‹

so listener is that forwarding listener instance you already got back from libssh2_channel_forward_listen_ex(3) β€” yes, that one, the one you set up earlier and have just been sitting there waiting on like a group chat with no notifications πŸ””


πŸ‘‘ RETURN VALUE πŸ‘‘

you get a newly allocated channel instance back, or NULL if it flopped 😭


πŸ’… ERRORS πŸ’…

when this function hands you NULL, do not panic β€” go call libssh2_session_last_errno(3) to pull out the actual error code, she'll tell you what went down πŸ”

and if that code comes back as LIBSSH2_ERROR_EAGAIN? that means the session is set to do non-blocking I/O, but the call would block. so like… it's giving "not right now, try again later" energy, not a real failure πŸ’€


🌈 SEE ALSO 🌈


and that's the whole page, no cap ✨ this was libssh2 version 0.15, dated 1 Jun 2007 β€” iconic vintage behavior honestly, periodt πŸ’œπŸ¦‹