libssh2_channel_send_eof(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_send_eof ✨

okay bestie, so this one lives in the libssh2 manual, section 3, and it's all about telling the remote server "that's it, I'm done talking" πŸ’…


🌸 NAME 🌸

libssh2_channel_send_eof β€” send EOF to remote server


πŸŽ€ SYNOPSIS πŸŽ€

#include <libssh2.h>

int
libssh2_channel_send_eof(LIBSSH2_CHANNEL *channel);

πŸ¦‹ DESCRIPTION πŸ¦‹

So basically, this function tells the remote host that no further data will be sent on the channel you specify. That's the whole vibe. 🫢

And the way that remote processes read this? They typically interpret it as a closed stdin descriptor β€” like you literally just closed the door on stdin and walked away. Main character exit, no notes. πŸšͺ✨


πŸ’– RETURN VALUE πŸ’–

  • Returns 0 on success β€” slay πŸŽ‰
  • Returns a negative value on failure 😭
  • Returns LIBSSH2_ERROR_EAGAIN when it would otherwise block.
ngl, LIBSSH2_ERROR_EAGAIN is a negative number, but it is not really a failure per se β€” it's giving "not right now bestie, try again later", not "everything is on fire". Don't panic. πŸ™ˆ

πŸ’€ ERRORS πŸ’€

  • LIBSSH2_ERROR_SOCKET_SEND β€” unable to send data on socket. (the socket said no. rude.) 😀

⭐ SEE ALSO ⭐


and that's the whole page fr fr πŸ§šβ€β™€οΈ this one's from libssh2 0.15, dated 1 Jun 2007 β€” yeah, it's been iconic for a minute. periodt. πŸ‘‘πŸ’œ