---
name: "nng_pipe_socket"
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_socket"
---

# nng\_pipe\_socket(3)

return owning socket for pipe

## NAME

nng\_pipe\_socket - return owning socket for pipe

## SYNOPSIS

```
#include <nng/nng.h>
nng_socket nng_pipe_socket(nng_pipe p);
```

## DESCRIPTION

The `nng_pipe_socket()` function returns the `nng_socket` associated with the pipe *p*.

**Note**\

The returned socket may be closed or in the process of closing, in which case it will not be usable with other functions.

## RETURN VALUES

This function returns the socket associated with the pipe.

## ERRORS

None.

## SEE ALSO

[nng\_pipe(5)](/nng_pipe/5.md), [nng\_socket(5)](/nng_socket/5.md), [nng(7)](/nng/7.md)
