libssh2_session_flag(3)
πΈ libssh2_session_flag(3) πΈ
okay bestie so this is a page from the libssh2 manual, and it's about libssh2_session_flag β the little function that lets you flip switches on a session you just made. and honestly? the NAME section says it's a TODO π so even the docs are like "we'll get to it." iconic behaviour fr fr.
β¨ NAME β¨
libssh2_session_flag β TODO π
like yes, that is literally what it says. the name is libssh2_session_flag and the description is TODO. no cap.
π SYNOPSIS π
#include <libssh2.h>
int
libssh2_session_flag(LIBSSH2_SESSION *session, int flag, int value);
so you pull in the header, and then you've got a function that takes three things: your session, a flag, and a value. and it hands you back an int. slay.
π DESCRIPTION π
okay so the whole vibe here is: you've got a session, right? and you wanna set options on it. that's it, that's the function.
flag is the option you're setting. value is like the on/off switch β you're typically passing 1 to turn the option on or 0 to turn it off. so it's basically flag says what, value says whether. π¦
β FLAGS β
here come the actual options, bestie. there's two of them. two little flags. babygirl flags.
LIBSSH2_FLAG_SIGPIPEβ if you set this one, then libssh2 will not attempt to blockSIGPIPEs, and instead it just lets them trigger from the underlying socket layer. so like. the signals are coming through. that's the whole point. π₯LIBSSH2_FLAG_COMPRESSβ if you set this one, and you do it before the connection negotiation is performed, then libssh2 will try to negotiate compression enabling for this connection. and listen β by default, libssh2 will not attempt to use compression. so if you want the compression glow-up, you gotta ask for it, and you gotta ask early. β°
π«Ά RETURN VALUE π«Ά
it returns a regular libssh2 error code. that's the whole thing. nothing fancy, no special snowflake return, just the standard error code behaviour like every other libssh2 function. periodt. π
π AVAILABILITY π
okay so the tea: this function has existed since the age of dawn. like, it was there at the beginning. ancient. primordial. main character energy since forever. π
and then LIBSSH2_FLAG_COMPRESS? that one is newer β it was added in version 1.2.8. so if you're on something older than that, no compression flag for you, sorry bestie. π
π§ SEE ALSO π§
nothing here! this section is literally empty in the original. no cross-references, no friends, just vibes. π
and that's the page!! source is libssh2 0.15, dated 1 Jun 2007 β so this doc is old enough to have its own driver's license, but the advice still eats. go forth and set your flags, bestie π β¨πΈ
π¦ where this page comes from
- alpine 3.22: libssh2-doc 1.11.1-r3 Β· BSD-3-Clause
- alpine 3.23: libssh2-doc 1.11.1-r4 Β· BSD-3-Clause
- alpine 3.24: libssh2-doc 1.11.1-r4 Β· BSD-3-Clause
- arch rolling: libssh2 1.11.1-7 Β· BSD-3-Clause
- debian trixie: libssh2-1-dev 1.11.1-1+deb13u1 Β· BSD3
- debian trixie: libssh2-1-dev 1.11.1-1+deb13u2 Β· BSD3
- epel 10: libssh2-docs 1.11.1-9.el10_3 Β· BSD-3-Clause
- epel 9: libssh2-docs 1.11.1-9.el9 Β· BSD-3-Clause
- fedora 43: libssh2-docs 1.11.1-4.fc43 Β· BSD-3-Clause
- fedora 43: libssh2-docs 1.11.1-9.fc43 Β· BSD-3-Clause
- fedora 44: libssh2-docs 1.11.1-5.fc44 Β· BSD-3-Clause
- fedora 44: libssh2-docs 1.11.1-9.fc44 Β· BSD-3-Clause
- opensuse-leap 16.0: libssh2-devel 1.11.1-160000.5.1 Β· BSD-3-Clause
- opensuse-leap 16.0: libssh2-devel 1.11.1-160000.5.1 Β· BSD-3-Clause
- opensuse-leap 16.0: libssh2-devel 1.11.1-160000.5.1 Β· BSD-3-Clause
- opensuse-leap 16.0: libssh2-devel 1.11.1-160000.5.1 Β· BSD-3-Clause
- ubuntu questing: libssh2-1-dev 1.11.1-1build1
- ubuntu questing: libssh2-1-dev 1.11.1-1ubuntu0.25.10.2
- ubuntu resolute: libssh2-1-dev 1.11.1-1build2 Β· BSD3
- ubuntu resolute: libssh2-1-dev 1.11.1-1ubuntu0.26.04.4 Β· BSD3
- ubuntu stonking: libssh2-1-dev 1.11.1-6 Β· BSD3
- π the page's license: BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms