NN_SURVEY(7)

πŸ“¦
version 1.2.2 Β· 5 versions
, in fedora 44

✨ NN_SURVEY(7) β€” the nanomsg survey scalability protocol ✨

okay bestie, sit DOWN because this is the manual page for nn_survey, part of nanomsg (the version is 1.2.2, in case you're keeping receipts πŸ“). it's giving "one girl asks a question, the whole group chat answers, and then she stops listening" energy and honestly? iconic. πŸ’…


🌸 SYNOPSIS 🌸

#include <nanomsg/nn.h>

#include <nanomsg/survey.h>

that's it. that's the whole ritual. go include those two headers and you're in. 🫢


πŸ’– DESCRIPTION πŸ’–

so the whole vibe of this protocol is: you get to broadcast a survey to multiple locations and then gather the responses. one question, many answerers, responses flowing back at you. it's a whole group project where you're the group leader and everyone else is doing the work. slay. πŸ‘‘

πŸŽ€ Socket Types πŸŽ€

  • NN_SURVEYOR β€” this is the asker, the main character, the one holding the clipboard. it's used to send the survey. the survey gets delivered to all the connected respondents β€” yes, every single one, no favorites. once the query is sent, this same socket can be used to receive the responses. and here's the dramatic part: when the survey deadline expires, receive will return an ETIMEDOUT error. the clock runs out, the party's over. πŸ’€
  • NN_RESPONDENT β€” this is the bestie answering the question. it's used to respond to the survey. the survey is received using the receive function, and the response is sent using the send function. and listen β€” this socket can be connected to at most one peer. one. single. peer. it's monogamous, no cap. πŸ¦‹

🧚 Socket Options 🧚

  • NN_SURVEYOR_DEADLINE β€” this one specifies how long to wait for responses to the survey. once the deadline expires, the receive function will return an ETIMEDOUT error, and all subsequent responses to the survey will be silently dropped. gone. ghosted. not even a read receipt. πŸ‘» the deadline is measured in milliseconds. the option type is int. the default value is 1000 (which is 1 second, for those of us who don't speak in milliseconds natively ✨).
lowkey important: that deadline isn't just a timeout, it's a whole vibe shift. after it hits, your socket straight up stops caring about anything else that comes in.

🌈 SEE ALSO 🌈

go read these next, they're all part of the same cinematic universe:

nn_bus(7) nn_pubsub(7) nn_reqrep(7) nn_pipeline(7) nn_pair(7) nanomsg(7)


πŸ‘‘ AUTHORS πŸ‘‘

this masterpiece was written by Martin Sustrik <sustrik@250bpm.com> β€” give them their flowers fr fr 🌸


and that's the whole page, bestie! this one's from the nanomsg project, version 1.2.2, and it was dated 2026-01-16 β€” so yeah, freshly stamped and everything. now go survey somebody. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from