libssh2_session_set_read_timeout(3)
π libssh2_session_set_read_timeout(3) π
okay bestie, listen up β this one lives in the libssh2 family, and it's the little function that decides how long your packet reads are allowed to just... sit there vibing before everyone admits something's wrong. no cap, it's a short page, but it's a real one. π«Ά
β¨ NAME β¨
libssh2_session_set_read_timeout β set timeout for packet read functions πΈ
β¨ SYNOPSIS β¨
#include <libssh2.h>
void
libssh2_session_set_read_timeout(LIBSSH2_SESSION *session, long timeout);
β¨ DESCRIPTION β¨
so basically you're setting the timeout, in seconds, for how long libssh2's packet read function calls are allowed to wait around before they're like "okay this is not it" and treat the whole situation as an error, returning LIBSSH2_ERROR_TIMEOUT. π
sessionβ yourLIBSSH2_SESSION *, the session whose read timeout you're changing.timeoutβ the timeout, as along, in seconds.
and here's the tea, bestie: by default β or if you set the timeout to zero β the timeout gets set to 60 seconds. that's the whole vibe. sixty. iconic, honestly. β³β¨
lowkey important: zero doesn't mean "wait forever", it means "give me the default", and the default is 60 seconds. don't get got. π
β¨ RETURN VALUE β¨
Nothing. literally nothing. it returns void, it does its thing, it leaves. main character behavior, no receipts. π
β¨ AVAILABILITY β¨
Added in 1.10.1 β (yes, this one's a newer era queen β if you're on something older, she's simply not there yet π¦)
β¨ SEE ALSO β¨
libssh2_session_get_read_timeout(3)β the matching getter, for when you wanna peek at what the timeout currently is π
and that's the page, bestie!! from the libssh2 crew, dated 13 Jan 202, and this whole rewrite was giving peak bestie energy fr fr. go set your timeouts, slay, and remember: sixty seconds is the default and zero is just a secret handshake for "default". periodt. πβ¨ππ¦πΈπ
π«Ά
π¦ 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