--- version: 0.7.0 layout: refman --- NNG Reference Manual: 0.7.0

The following pages are present:

Section 1: Commands and Utilities

This section documents utilities and programs that are included with the distribution.

nngcat(1)

command line access to Scalabity Protocols

Section 3: Library Functions

This section documents core libary functions that are callable by applications.

libnng(3)

nanomsg next generation library

nng_aio_abort(3)

abort asynchronous I/O operation

nng_aio_alloc(3)

allocate asynchronous I/O handle

nng_aio_cancel(3)

cancel asynchronous I/O operation

nng_aio_count(3)

return number of bytes transferred

nng_aio_finish(3)

finish asynchronous I/O operation

nng_aio_free(3)

free asynchronous I/O handle

nng_aio_get_input(3)

return input parameter

nng_aio_get_msg(3)

get message from asynchronous receive

nng_aio_get_output(3)

return output result

nng_aio_result(3)

return result of asynchronous operation

nng_aio_set_input(3)

set input parameter

nng_aio_set_iov(3)

set scatter/gather vector

nng_aio_set_msg(3)

set message for asynchronous send

nng_aio_set_output(3)

set output result

nng_aio_set_timeout(3)

set asynchronous I/O timeout

nng_aio_stop(3)

stop asynchronous I/O operation

nng_aio_wait(3)

wait for asynchronous I/O operation

nng_alloc(3)

allocate memory

nng_bus_open(3)

create bus socket

nng_close(3)

close socket

nng_device(3)

send message

nng_dial(3)

create and start dialer

nng_dialer_close(3)

close dialer

nng_dialer_create(3)

create dialer

nng_dialer_getopt(3)

get dialer option

nng_dialer_setopt(3)

set dialer option

nng_dialer_start(3)

start dialer

nng_free(3)

free memory

nng_getopt(3)

get socket option

nng_inproc_register(3)

register inproc transport

nng_ipc_register(3)

register ipc transport

nng_listen(3)

create and start listener

nng_listener_close(3)

close listener

nng_listener_create(3)

create listener

nng_listener_getopt(3)

get listener option

nng_listener_setopt(3)

set listener option

nng_listener_start(3)

start listener

nng_msg_alloc(3)

allocate a message

nng_msg_append(3)

append to message body

nng_msg_body(3)

return message body

nng_msg_chop(3)

remove data from end of message body

nng_msg_clear(3)

clear message body content

nng_msg_dup(3)

duplicate a message

nng_msg_free(3)

free a message

nng_msg_get_pipe(3)

get pipe for message

nng_msg_header(3)

return message header

nng_msg_header_append(3)

append to message header

nng_msg_header_chop(3)

remove data from end of message header

nng_msg_header_clear(3)

clear message header

nng_msg_header_insert(3)

prepend to message header

nng_msg_header_len(3)

return message header length

nng_msg_header_trim(3)

remove data from start of message header

nng_msg_insert(3)

prepend to message body

nng_msg_len(3)

return message body length

nng_msg_realloc(3)

reallocate a message

nng_msg_set_pipe(3)

set pipe for message

nng_msg_trim(3)

remove data from start of message body

nng_pair_open(3)

create pair socket

nng_pipe_close(3)

close pipe

nng_pipe_getopt(3)

get pipe option

nng_pub_open(3)

create pub socket

nng_pull_open(3)

create pull socket

nng_push_open(3)

create push socket

nng_recv(3)

recv data

nng_recv_aio(3)

receive message asynchronously

nng_recvmsg(3)

recv message

nng_rep_open(3)

create rep socket

nng_req_open(3)

create rep socket

nng_respondent_open(3)

create respondent socket

nng_send(3)

send data

nng_send_aio(3)

send message asynchronously

nng_sendmsg(3)

send message

nng_setopt(3)

set socket option

nng_sleep_aio(3)

sleep asynchronously

nng_strerror(3)

return an error description

nng_sub_open(3)

create sub socket

nng_surveyor_open(3)

create surveyor socket

nng_tcp_register(3)

register tcp transport

nng_tls_register(3)

register tls transport

nng_url_clone(3)

clone URL structure

nng_url_free(3)

free a URL structure

nng_url_parse(3)

create URL structure from a string

nng_version(3)

report library version

nng_ws_register(3)

register websocket transport

nng_wss_register(3)

register websocket secure transport

nng_zt_register(3)

register ZeroTier transport

Section 3compat: Compatible Library Functions

This section documents the nanomsg 1.0 libary compatible functions.

nng_compat(3compat)

compatibility with nanomsg 1.0

Section 3http: Supplemental HTTP Functions

This section documents supplemental HTTP support functions that are available.

nng_http_client_alloc(3http)

allocate HTTP client

nng_http_client_connect(3http)

establish HTTP client connection

nng_http_client_free(3http)

free HTTP client

nng_http_client_get_tls(3http)

get HTTP client TLS configuration

nng_http_client_set_tls(3http)

set HTTP client TLS configuration

nng_http_conn_close(3http)

close HTTP connection

nng_http_conn_read(3http)

read from HTTP connection

nng_http_conn_read_all(3http)

read all from HTTP connection

nng_http_conn_read_req(3http)

read HTTP request

nng_http_conn_read_res(3http)

read HTTP response

nng_http_conn_write(3http)

write to HTTP connection

nng_http_conn_write_all(3http)

write all to HTTP connection

nng_http_conn_write_req(3http)

write HTTP request

nng_http_conn_write_res(3http)

write HTTP response

nng_http_handler_alloc(3http)

allocate HTTP server handler

nng_http_handler_free(3http)

free HTTP server handler

nng_http_handler_get_data(3http)

return extra data for HTTP handler

nng_http_handler_set_data(3http)

set extra data for HTTP handler

nng_http_handler_set_host(3http)

set host for HTTP handler

nng_http_handler_set_method(3http)

set HTTP handler method

nng_http_handler_set_tree(3http)

set HTTP handler to match trees

nng_http_hijack(3http)

hijack HTTP server connection

nng_http_req_add_header(3http)

add HTTP request header

nng_http_req_alloc(3http)

allocate HTTP request structure

nng_http_req_copy_data(3http)

copy HTTP request body

nng_http_req_del_header(3http)

set HTTP request header

nng_http_req_free(3http)

free HTTP request structure

nng_http_req_get_header(3http)

return HTTP request header

nng_http_req_get_method(3http)

return HTTP request method

nng_http_req_get_uri(3http)

return HTTP request URI

nng_http_req_get_version(3http)

return HTTP request protocol version

nng_http_req_set_data(3http)

set HTTP request body

nng_http_req_set_header(3http)

set HTTP request header

nng_http_req_set_method(3http)

set HTTP request method

nng_http_req_set_uri(3http)

set HTTP request URI

nng_http_req_set_version(3http)

set HTTP request protocol version

nng_http_res_add_header(3http)

add HTTP response header

nng_http_res_alloc(3http)

allocate HTTP response structure

nng_http_res_alloc_error(3http)

allocate HTTP error response

nng_http_res_copy_data(3http)

copy HTTP response body

nng_http_res_del_header(3http)

set HTTP response header

nng_http_res_free(3http)

free HTTP response structure

nng_http_res_get_header(3http)

return HTTP response header

nng_http_res_get_reason(3http)

return HTTP response reason

nng_http_res_get_status(3http)

return HTTP status code

nng_http_res_get_version(3http)

return HTTP response protocol version

nng_http_res_set_data(3http)

set HTTP response body

nng_http_res_set_header(3http)

set HTTP response header

nng_http_res_set_reason(3http)

set HTTP response reason

nng_http_res_set_status(3http)

set HTTP response status

nng_http_res_set_version(3http)

set HTTP response protocol version

nng_http_server_add_handler(3http)

add HTTP server handler

nng_http_server_del_handler(3http)

delete HTTP server handler

nng_http_server_get_tls(3http)

get HTTP server TLS configuration

nng_http_server_hold(3http)

get and hold HTTP server instance

nng_http_server_release(3http)

release HTTP server instance

nng_http_server_set_tls(3http)

set HTTP server TLS configuration

nng_http_server_start(3http)

start HTTP server

nng_http_server_stop(3http)

stop HTTP server

Section 3tls: Supplemental TLS Functions

This section documents supplemental TLS functions that are available.

nng_tls_config_alloc(3tls)

allocate TLS configuration object

nng_tls_config_auth_mode(3tls)

configure authentication mode

nng_tls_config_ca_chain(3tls)

configure certificate authority certificate chain

nng_tls_config_ca_file(3tls)

load certificate authority from file

nng_tls_config_cert_key_file(3tls)

load own certificate and key from file

nng_tls_config_free(3tls)

deallocate a TLS configuration object

nng_tls_config_own_cert(3tls)

configure own certificate and key

nng_tls_config_server_name(3tls)

configure remote server name

Section 5: Macros and Types

This section documents core macros and types that are available.

nng_aio(5)

asynchronous I/O handle

nng_dialer(5)

dialer

nng_duration(5)

relative time in milliseconds

nng_iov(5)

scatter/gather element

nng_listener(5)

listener

nng_msg(5)

message

nng_options(5)

socket, dialer, listener, and pipe options

nng_pipe(5)

communications pipe

nng_sockaddr(5)

socket address

nng_sockaddr_in(5)

IPv4 socket address

nng_sockaddr_in6(5)

IPv6 socket address

nng_sockaddr_inproc(5)

inproc socket address

nng_sockaddr_ipc(5)

IPC socket address

nng_sockaddr_zt(5)

ZeroTier socket address

nng_socket(5)

socket handle

Section 7: Protocols and Transports

This sections documents various protocols and transports that are available in the distribution.

nng(7)

nanomsg next generation

nng_bus(7)

bus protocol

nng_inproc(7)

intra-process transport

nng_ipc(7)

IPC transport

nng_pair(7)

pair protocol

nng_pub(7)

publisher protocol

nng_pull(7)

pull protocol

nng_push(7)

push protocol

nng_rep(7)

reply protocol

nng_req(7)

request protocol

nng_respondent(7)

respondent protocol

nng_sub(7)

subscriber protocol

nng_surveyor(7)

surveyor protocol

nng_tcp(7)

TCP/IP transport

nng_tls(7)

TLS transport

nng_ws(7)

WebSocket transport

nng_zerotier(7)

ZeroTier transport