NNG_SURVEYOR_OPEN(3)

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

✨ NNG_SURVEYOR_OPEN ✨

okay bestie, welcome to the NNG_SURVEYOR_OPEN(3) page from the NNG Reference Manual πŸ’– this is your group chat briefing on how to spin up a surveyor socket, and ngl it's a short one but it's iconic. let's go πŸ¦‹


πŸ’… NAME πŸ’…

nng_surveyor_open β€” create surveyor socket

like, that's the whole job. create the socket. main character energy fr fr πŸŽ€


🌸 SYNOPSIS 🌸

#include <nng/nng.h>
#include <nng/protocol/survey0/survey.h>

int nng_surveyor0_open(nng_socket *s);

int nng_surveyor0_open_raw(nng_socket *s);

two includes, two functions, both handing you back a socket. slay ✨


🫢 DESCRIPTION 🫢

so here's the tea β˜•

  • nng_surveyor0_open() β€” this one creates a surveyor version 0 socket and returns it at the location pointed to by s. it's giving "here's your socket, go ask everybody a question" πŸ“‹
  • nng_surveyor0_open_raw() β€” same energy but raw mode. it creates a surveyor version 0 socket in raw mode and returns it at the location pointed to by s. raw mode is for when you wanna handle the protocol framing yourself, no cap πŸ’€

both of them write the socket into the thing s points at, so make sure s is actually pointing at an nng_socket. lowkey important. πŸ‘‘


πŸ”₯ RETURN VALUES πŸ”₯

these functions return 0 on success, and non-zero otherwise. that's it, that's the vibe check. zero = we ate, non-zero = something's up 😭


πŸ’€ ERRORS πŸ’€

when things go sideways, one of these lil guys shows up:

  • NNG_ENOMEM β€” insufficient memory is available. your machine said "bestie I simply cannot" πŸ₯²
  • NNG_ENOTSUP β€” the protocol is not supported. like the protocol just didn't show up to the party πŸ™ˆ

🌈 SEE ALSO 🌈

go read these next, for real:


that's the whole page, you understood it, I'm so proud of you πŸ₯ΉπŸ’œ this was the NNG Reference Manual for NNG_SURVEYOR_OPEN(3), dated 2026-06-30. go forth and open sockets, periodt βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from