NNG_INPROC(7)

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

πŸ’– nng_inproc β€” the intra-process transport, bestie πŸ’–

okay so you know how sometimes you're like "why is my data going on a whole little journey" β€” yeah no, this is nng_inproc, from the NNG Reference Manual (section 7, she's fancy). it's the intra-process transport and it is lowkey the simplest thing ever and I'm obsessed with her πŸ’…


✨ SYNOPSIS ✨

#include <nng/transport/inproc/inproc.h>

int nng_inproc_register(void);

🌸 DESCRIPTION 🌸

so the inproc transport lets sockets within the same process talk to each other. that's it, that's the vibe. same process, no network, no sockets leaving the building, nothing.

and here's the slay part: you'd use this instead of the slower transports whenever your data literally just needs to move around inside the same process. why take the long way home when the door's right there, yk?

this transport tries super hard to avoid copying data, which is why she's so light-weight. main character energy honestly β€” minimal effort, maximum results βœ¨πŸ¦‹

πŸŽ€ Registration

this transport is generally built-in to the core, so bestie... there are no extra steps you need to take to use it. it's already there. she lives here. πŸ’–

🌈 URI Format

this transport uses URIs with the scheme inproc://, and then after that you can put an arbitrary string of text, terminated by a NUL byte.

a few things to know, no cap:

  • you can use multiple URIs within the same application, and they will not interfere with one another. they mind their own business, respectfully 🫢
  • two applications can also use the same URI without interfering with each other β€” but heads up, that means they will be unable to communicate with each other using that URI. like showing up to the same party but somehow never finding each other 😭

πŸ¦‹ Socket Address

when you're dealing with an nng_sockaddr structure, the actual structure in play is of type nng_sockaddr_inproc. so that's the one you want, okay? πŸ’…

πŸ‘‘ Transport Options

the inproc transport has no special options. none. zero. empty. clean slate, no notes ✨

Note πŸŽ€ so, inproc does accept the option NNG_OPT_RECVMAXSZ for compatibility reasons β€” but the value of that option is ignored, with no enforcement. fr fr, it does nothing. why? because inproc peers are in the same address space</>, so they're implicitly trusted. meaning it makes literally no sense to spend cycles protecting a program from itself. like locking your own bedroom door from the inside of your own bedroom. girl. πŸ’€

🌟 SEE ALSO 🌟


okay that's the whole page bestie, you're basically an inproc expert now, go be iconic with it πŸ§šπŸ’œ

smooches and goodbye from the NNG Reference Manual, dated 2026-06-30 β€” NNG_INPROC(7), periodt. πŸ’–βœ¨πŸ‘‘

πŸ“¦ where this page comes from