libssh2_session_set_read_timeout(3)

πŸ“¦
version 1.11.1 Β· 2 versions
  • 1.11.1 Β· 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 (latest)
  • 1.11.0 Β· ubuntu noble
, 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_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 β€” your LIBSSH2_SESSION *, the session whose read timeout you're changing.
  • timeout β€” the timeout, as a long, 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 ✨


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. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά