diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-10-13 22:21:57 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-10-13 22:21:57 -0700 |
| commit | 2b4e9b6375db9bea3859dd20eeb9e81aad279ffd (patch) | |
| tree | c72da098948b874d9a6289c53cdc3921ae1f91a6 /docs/ref/api/msg | |
| parent | 8fcf6433c2275505e6f12727e3cb209561042c5d (diff) | |
| download | nng-2b4e9b6375db9bea3859dd20eeb9e81aad279ffd.tar.gz nng-2b4e9b6375db9bea3859dd20eeb9e81aad279ffd.tar.bz2 nng-2b4e9b6375db9bea3859dd20eeb9e81aad279ffd.zip | |
Forgot to commit nng_msg_pipe
Diffstat (limited to 'docs/ref/api/msg')
| -rw-r--r-- | docs/ref/api/msg/nng_msg_pipe.md | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/docs/ref/api/msg/nng_msg_pipe.md b/docs/ref/api/msg/nng_msg_pipe.md new file mode 100644 index 00000000..ec6fe910 --- /dev/null +++ b/docs/ref/api/msg/nng_msg_pipe.md @@ -0,0 +1,40 @@ +# nng_msg_pipe + +## NAME + +nng_msg_pipe --- set or get pipe for message + +## SYNOPSIS + +```c +#include <nng/nng.h> + +nng_pipe nng_msg_get_pipe(nng_msg *msg); +void nng_msg_get_pipe(nng_msg *msg, nng_pipe p); +``` + +## DESCRIPTION + +The {{i:`nng_msg_set_pipe`}} function sets the [pipe][pipe] associated with [message][msg] _m_ to _p_. +This is most often useful when used with protocols that support directing +a message to a specific peer. +For example the [_PAIR_][pair] version 1 protocol can do +this when `NNG_OPT_PAIR1_POLY` mode is set. + +The {{i:`nng_msg_get_pipe`}} function returns the pipe that was previously set on the message _m_, +either directly by the application, or when the message was received by the protocol. + +> [!NOTE] +> Not all protocols support overriding the destination pipe. + +## RETURN VALUES + +The `nng_msg_get_pipe` function returns the pipe for the message _m_. + +## SEE ALSO + +[nng_msg][msg] + +[msg]: ./nng_msg.md +[pair]: TODO.md +[pipe]: TODO.md |
