nng_socket_raw(3)

nng_socket_raw3

Return whether socket is cooked or raw

Usage

#include <nng/nng.h>
int nng_socket_raw(nng_socket s, bool *raw);

Overview

The nng_socket_raw() function stores true in raw if the socket is in raw mode, otherwise it stores false.

Tip

This function should be used in place of the NNG_OPT_RAW option in new code.

Return values

This function returns zero on success, or an error if the socket is invalid.

Errors

NNG_ECLOSED

Parameter s does not refer to an open socket.

From libnng-dev 1.10.1-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.