libssh2_channe..._extended_data2(3)
π libssh2_channel_handle_extended_data2 β bestie edition π
okay so real quick: this is a page from the libssh2 manual, and we're talking about libssh2_channel_handle_extended_data2, the little function that decides what your channel does with extended data. it's giving β¨traffic controlβ¨ for the weird extra packets. let's get into it π«Ά
β¨ NAME β¨
libssh2_channel_handle_extended_data2 β set extended data handling mode, bestie. that's literally the whole job. π
πΈ SYNOPSIS πΈ
#include <libssh2.h>
int
libssh2_channel_handle_extended_data2(LIBSSH2_CHANNEL *channel,
int ignore_mode);
look at her. two args, one int coming back. iconic behavior, no notes. π
π¦ DESCRIPTION π¦
so the args, one at a time, because we do not skip details in this house:
channelβ the active channel stream you wanna change the extended data handling on. that's the one you're messing with, girl.ignore_modeβ you gotta hand her exactly one of the threeLIBSSH2_CHANNEL_EXTENDED_DATA_*constants. pick your fighter:LIBSSH2_CHANNEL_EXTENDED_DATA_NORMAL: queue extended data for eventual reading. it just... waits patiently. very demure. πLIBSSH2_CHANNEL_EXTENDED_DATA_MERGE: treat extended data and ordinary data the same. merge all substreams so that calls tolibssh2_channel_read(3)will pull from all substreams on a first-in/first-out basis. one big slushie of data, fr fr. π₯€LIBSSH2_CHANNEL_EXTENDED_DATA_IGNORE: discard all extended data as it arrives. not me ghosting the packets π they get yeeted on arrival, periodt.
and that's the whole point of the function: change how a channel deals with extended data packets. by default all extended data is queued until read by libssh2_channel_read_ex(3). so if you never call this, she's just sitting there holding it in. relatable tbh. π
π RETURN VALUE π
- returns
0on success π - returns
LIBSSH2_ERROR_EAGAINwhen it would otherwise block π
that's it. that's the tea. π
π SEE ALSO π
go read those too, iykyk. π§
okay that's the page!! this was libssh2 version 0.15, dated 1 Jun 200 (yes the date got cut off, blame the original, not me π
), and this whole manual page belongs to the libssh2_channe..._extended_data2(3) entry. love that for us. mwah, bye 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