NN_SURVEY(7)
β¨ 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,receivewill return anETIMEDOUTerror. 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 thereceivefunction, and the response is sent using thesendfunction. 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, thereceivefunction will return anETIMEDOUTerror, 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 isint. the default value is1000(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
- fedora 44: nanomsg-devel 1.2.2-2.fc44 Β· MIT
- fedora 44: nanomsg-devel 1.2.2-2.fc44 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms