summaryrefslogtreecommitdiff
path: root/docs/reference/src/sock/nng_push_open.md
blob: aed86f735b35054b282d6f70fa859fa67ef5f4b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# nng_push_open

## NAME

nng_push_open --- create _PUSH_ socket

## SYNOPSIS

```c
#include <nng/nng.h>
#include <nng/protocol/pipeline0/push.h>

int nng_push0_open(nng_socket *s);

int nng_push0_open_raw(nng_socket *s);
```

## DESCRIPTION

The `nng_push0_open()` function creates a [{{i:*PUSH*}}][push] version 0
[socket][socket] and returns it at the location pointed to by _s_.

The `nng_push0_open_raw()` function creates a _PUSH_ version 0 socket in
[raw mode][raw] and returns it at the location pointed to by _s_.

## RETURN VALUES

These functions return 0 on success, and non-zero otherwise.

## ERRORS

- `NNG_ENOMEM`: Insufficient memory is available.
- `NNG_ENOTSUP`: The protocol is not supported.

## SEE ALSO

[Sockets][socket],
[_PULL_ Protocol][pull],
[_PUSH_ Protocol][push]

{{#include ../refs.md}}