libssh2_session_callback_set(3)

πŸ“¦
version 1.11.1 Β· 3 versions
, 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

✨ NAME ✨

libssh2_session_callback_set β€” set a callback function, bestie πŸ’–

This is the manual page for libssh2_session_callback_set from the libssh2 crew, and yes she's a lil old-school. Keep reading, iykyk.


🌸 SYNOPSIS 🌸

#include <libssh2.h>

void *
libssh2_session_callback_set(LIBSSH2_SESSION *session,
                             int cbtype, void *callback);

πŸ’… DESCRIPTION πŸ’…

Okay so first thing, no cap: this function is DEPRECATED in 1.11.1. Use the libssh2_session_callback_set2(3) function instead, fr fr. She's giving legacy energy and we're moving on. πŸ™ˆ

This implementation is expecting and returning a data pointer for callback functions. That's the whole vibe here β€” data pointer in, data pointer out. ✨

For the details about the replacement function, see libssh2_session_callback_set2(3), which is expecting and returning a function pointer. Different era, different pointer type, okay? πŸ’…

🚨 Bestie warning: don't build new stuff on this one. It's deprecated. Go hang with libssh2_session_callback_set2(3) instead. Periodt.

🫢 RETURN VALUE 🫢

Pointer to previous callback handler. Returns NULL if no prior callback handler was set or the callback type was unknown.

That's it, that's the tea. If you get NULL, either nothing was there before or that callback type was a mystery. πŸ‘‘


πŸ¦‹ SEE ALSO πŸ¦‹


This lil page comes from <strong>libssh2 0.15</strong>, dated <strong>1 Jun 2007</strong> β€” vintage icon behavior, honestly. Stay slay, check the replacement function, and hydrate. πŸ’–πŸŒˆ