diff options
| author | Garrett D'Amore <garrett@damore.org> | 2019-01-06 12:02:48 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2019-01-06 12:12:27 -0800 |
| commit | ff06de11cf5a953f47d22bd896f3860697c520c8 (patch) | |
| tree | d8c808c879648cc29dee3e65bded91932be4093a /docs/man/nng_tcp.5.adoc | |
| parent | 6d0027fae75e4810d66eb4c5817255ffa517e158 (diff) | |
| download | nng-ff06de11cf5a953f47d22bd896f3860697c520c8.tar.gz nng-ff06de11cf5a953f47d22bd896f3860697c520c8.tar.bz2 nng-ff06de11cf5a953f47d22bd896f3860697c520c8.zip | |
fixes #845 TCP public API doc updates
Diffstat (limited to 'docs/man/nng_tcp.5.adoc')
| -rw-r--r-- | docs/man/nng_tcp.5.adoc | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/docs/man/nng_tcp.5.adoc b/docs/man/nng_tcp.5.adoc index 10a3c2f3..7bf0a82f 100644 --- a/docs/man/nng_tcp.5.adoc +++ b/docs/man/nng_tcp.5.adoc @@ -2,6 +2,7 @@ // // Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> +// Copyright 2019 Devolutions <info@devolutions.net> // // This document is supplied under the terms of the MIT License, a // copy of which should be located in the distribution where this @@ -33,24 +34,37 @@ should not be confused with a pipe object created using the <<nng_tcp.7#,nng_tcp(7)>> transport. TIP: Most NNG applications should not use this, but instead use the -`<<nng_tcp.7#,nng_tcp>>` transport instead. +<<nng_tcp.7#,nng_tcp(7)>> transport instead. These objects are created either establishing an outgoing connection -with `<<nng_tcp_dialer_dial.3tcp#,nng_tcp_dialer_dial()>>` or by +with <<nng_tcp_dialer_dial.3tcp#,`nng_tcp_dialer_dial()`>> or by accepting in incoming connection with -`<<nng_tcp_listener_accept.3tcp#,nng_tcp_listener_accept()>>`. +<<nng_tcp_listener_accept.3tcp#,`nng_tcp_listener_accept()`>>. TCP connections are byte streams, and are "`reliable`" in that data will not be delivered out of order, or with portions missing. -Data can be sent using `<<nng_tcp_send.3tcp#,nng_tcp_send()>>` or -received with `<<nng_tcp_recv.3tcp#,nng_tcp_recv()>>`. +Data can be sent using <<nng_tcp_send.3tcp#,`nng_tcp_send()`>> or +received with <<nng_tcp_recv.3tcp#,`nng_tcp_recv()`>>. When the connection is no longer needed, it should be freed with -`<<nng_tcp_free.3tcp#,nng_tcp_free()>>`. +<<nng_tcp_free.3tcp#,`nng_tcp_free()`>>. TIP: It is possible to close the connection, without freeing it, by -using `<<nng_tcp_close.3tcp#,nng_tcp_close()>>`. +using <<nng_tcp_close.3tcp#,`nng_tcp_close()`>>. + +=== Options + +The following options are applicable to TCP connections, and may be +accessed using the <<nng_tcp_getopt.3tcp#,`nng_tcp_getopt()`>> and +<<nng_tcp_setopt.3tcp#,`nng_tcp_setopt()`>> functions. + +* <<nng_options.5#NNG_OPT_LOCADDR,`NNG_OPT_LOCADDR`>> +* <<nng_options.5#NNG_OPT_REMADDR,`NNG_OPT_REMADDR`>> +* <<nng_options.5#NNG_OPT_TCP_KEEPALIVE,`NNG_OPT_TCP_KEEPALIVE`>> +* <<nng_options.5#NNG_OPT_TCP_NO_DELAY,`NNG_OPT_TCP_NODELAY`>> + +Other platform specific options may be available as well. == SEE ALSO @@ -59,11 +73,9 @@ using `<<nng_tcp_close.3tcp#,nng_tcp_close()>>`. <<nng_tcp_close.3tcp#,nng_tcp_close(3tcp)>>, <<nng_tcp_dialer_dial.3tcp#,nng_tcp_dialer_dial(3tcp)>>, <<nng_tcp_free.3tcp#,nng_tcp_free(3tcp)>>, +<<nng_tcp_getopt.3tcp#,nng_tcp_getopt(3tcp)>>, <<nng_tcp_listener_accept.3tcp#,nng_tcp_listener_accept(3tcp)>>, -<<nng_tcp_peername.3tcp#,nng_tcp_peername(3tcp)>>, <<nng_tcp_recv.3tcp#,nng_tcp_recv(3tcp)>>, <<nng_tcp_send.3tcp#,nng_tcp_send(3tcp)>>, -<<nng_tcp_sockname.3tcp#,nng_tcp_sockname(3tcp)>>, -<<nng_tcp_set_keepalive.3tcp#,nng_tcp_set_keepalive(3tcp)>>, -<<nng_tcp_set_nodelay.3tcp#,nng_tcp_set_nodelay(3tcp)>>, +<<nng_tcp_setopt.3tcp#,nng_tcp_setopt(3tcp)>>, <<nng.7#,nng(7)>> |
