NNG_SOCKET_RAW(3)

πŸ“¦
version 1.12.0 Β· 4 versions
, in ubuntu stonking

✨ NNG_SOCKET_RAW(3) ✨

okay bestie, welcome to the NNG Reference Manual πŸŽ€ this one's a lil baby page about asking a socket whether it's raw or cooked, and honestly? short king behavior. let's get into it πŸ’…


🌸 NAME 🌸

nng_socket_raw β€” return whether socket is cooked or raw πŸ“


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <nng/nng.h>

int nng_socket_raw(nng_socket s, bool *raw);

πŸ’– DESCRIPTION πŸ’–

The nng_socket_raw() function stores true in raw if the socket is in raw mode, otherwise it stores false. that's it. that's the whole function. no cap 🧚

✨ Tip ✨ bestie, listen β€” this function should be used in place of the NNG_OPT_RAW option in new code. like, NNG_OPT_RAW is still out here living its life, but for anything new? use this. the way that the old option is lowkey over and this is the main character now 😌

🌈 RETURN VALUES 🌈

This function returns zero on success ✨, or an error if the socket is invalid. slay when it works, sad when it doesn't 😭


πŸ’€ ERRORS πŸ’€

  • NNG_ECLOSED β€” Parameter s does not refer to an open socket. it's giving "who dis, i don't know her" πŸ™ˆ the socket you handed over isn't open, so there's nothing to inspect, periodt.

πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole vibe check βœ… this was NNG_SOCKET_RAW(3) from the NNG Reference Manual, dated 2026-06-30 πŸ’œ go forth and interrogate your sockets, bestie β€” they can't hide from you πŸ«ΆπŸ’…

πŸ“¦ where this page comes from