---
name: "nng_pipe_listener"
section: "3"
platform: "linux"
package: "libnng-dev"
version: "1.10.1-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/nng_pipe_listener"
---

# nng\_pipe\_listener(3)

return listener that created pipe

## NAME

nng\_pipe\_listener - return listener that created pipe

## SYNOPSIS

```
#include <nng/nng.h>
nng_listener nng_pipe_listener(nng_pipe p);
```

## DESCRIPTION

The `nng_pipe_listener()` function returns the `nng_listener` that created the pipe *p*. If the pipe was not created by a listener, then the returned value will have an identifier (`nng_listener_id()`) of `-1`.

## RETURN VALUES

This function returns the listener that created the pipe, unless it was not created by a listener, in which case a value initialized with `NNG_LISTENER_INITIALIZER` will be returned.

## ERRORS

None.

## SEE ALSO

[nng\_pipe(5)](/nng_pipe/5.md), [nng\_listener(5)](/nng_listener/5.md), [nng(7)](/nng/7.md)
