NNG_PULL(7)
π nng_pull β the pull protocol, explained by your fave β¨
okay bestie, come sit with me, we're talking nng_pull from the NNG Reference Manual and honestly? it's giving main character energy for load balancers. π«Ά
π SYNOPSIS π
#include <nng/protocol/pipeline0/pull.h>
π¦ DESCRIPTION π¦
so. the pull protocol is one half of a pipeline pattern. the other half? that's the push protocol. they're a duo, they're inseparable, they're the brangelina of messaging patterns. π
here's the vibe: in the pipeline pattern, pushers distribute messages to pullers. every single message a pusher sends goes to one of its peer pullers β picked round-robin style from the set of connected peers that are available for receiving. and the way that just naturally spreads the work around?? obsessed. that's literally why this pattern is so useful in load-balancing scenarios. π
π₯ Socket Operations π₯
the nng_pull0_open() functions create a puller socket. this socket may be used to receive messages, but it is unable to send them. no cap.
try to send anyway? you get NNG_ENOTSUP straight to the face. π
when it comes to receiving, the pull protocol just accepts messages as they arrive from peers. and bestie, listen β if two peers both have a message ready, the order in which those messages get handled is undefined. so don't come for me when the ordering isn't what you expected. it's not a bug, it's just... not defined. π
β¨ Protocol Versions β¨
only version 0 of this protocol is supported. (at the time of writing, no other versions of this protocol have been defined.) so like, version 0 or nothing, periodt. π
π Protocol Options π
the pull protocol has no protocol-specific options. clean. minimal. iconic. β¨
πΈ Protocol Headers πΈ
the pull protocol has no protocol-specific headers. nothing extra, she's lowkey effortless. π¦
π SEE ALSO π
and that's the whole page, bestie!! written up as part of the NNG Reference Manual, dated 2026-06-30. go forth and pull those messages, you've got this π«Άπβ¨β
π¦ 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