libssh2_poll_channel_read(3)
π libssh2_poll_channel_read β the libssh2 manual, bestie edition π
okay so. this page lives in the libssh2 manual, and we're talking about libssh2_poll_channel_read(3). yes, the third section. yes, we're being fancy about it. π
β¨ NAME β¨
libssh2_poll_channel_read β check if data is available
like. literally that's the whole job. vibe check on your read buffer. π¦
πΈ SYNOPSIS πΈ
#include <libssh2.h>
int
libssh2_poll_channel_read(LIBSSH2_CHANNEL *channel, int extended);
π DESCRIPTION π
okay bestie, before you get attached: this function is deprecated. Do note use. like, that's the actual wording, and honestly? iconic typo, we're keeping it, but the energy is real β don't use this one. π
so what does it even do. libssh2_poll_channel_read(3) checks to see if data is available in the channel's read buffer. that's it. that's the whole main character moment. and here's the catch: no attempt is made with this method to see if packets are available to be processed. so it's a peek at the buffer and nothing more, no packet-processing intel whatsoever. π
if you want the full polling support β the real, complete, everything-bagel version β go use libssh2_poll(3) instead. periodt. π
β RETURN VALUE β
- returns
1when data is available - returns
0otherwise
fr fr, those are the only two outcomes. simple queen behaviour. π
π«Ά SEE ALSO π«Ά
π quick recap for the group chat: deprecated, don't use it, it only checks the read buffer, it does NOT check for packets to process, and libssh2_poll(3) is the one you actually want. iykyk. β¨
and that's the page, babe β straight out of libssh2 0.15, dated 14 Dec 2006. ancient. archival. still slaying in the man pages. π§π mwah, go poll responsibly. π
π¦ 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