NNG_SURVEYOR_OPEN(3)
β¨ 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 bys. 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 bys. 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
- ubuntu stonking: libnng-dev 1.12.0-1 Β· MIT OR Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms