Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
NN_TCP(7)			  nanomsg 1.1.5 		       NN_TCP(7)

NAME
     nn_tcp - TCP transport mechanism

SYNOPSIS
     #include <nanomsg/nn.h>

     #include <nanomsg/tcp.h>

DESCRIPTION
     TCP transport allows for passing messages over the network using simple re-
     liable one-to-one connections. TCP is the most widely used transport proto-
     col, it is virtually ubiquitous and thus the transport of choice for commu-
     nication over the network.

     When  binding  a TCP socket address of the form tcp://interface:port should
     be used. Port is the TCP port number to use. Interface is one of  the  fol-
     lowing (optionally placed within square brackets):

     *	 Asterisk character (*) meaning all local network interfaces.

     *	 IPv4	address   of   a   local   network  interface  in  numeric  form
	 (192.168.0.111).

     *	 IPv6 address of a local network interface in numeric form (::1).

     When connecting a	TCP  socket  address  of  the  form  tcp://interface;ad-
     dress:port should be used. Port is the TCP port number to use. Interface is
     optional  and specifies which local network interface to use. If not speci-
     fied, OS will select an appropriate interface itself. If specified  it  can
     be one of the following (optionally placed within square brackets):

     *	 IPv4	address   of   a   local   network  interface  in  numeric  form
	 (192.168.0.111).

     *	 IPv6 address of a local network interface in numeric form (::1).

     Finally, address specifies the remote address to connect to. It can be  one
     of the following (optionally placed within square brackets):

     *	 IPv4	address   of   a   remote  network  interface  in  numeric  form
	 (192.168.0.111).

     *	 IPv6 address of a remote network interface in numeric form (::1).

     *	 The DNS name of the remote box.

   Socket Options
     NN_TCP_NODELAY
	 This option, when set to 1, disables Nagle's algorithm.  It  also  dis-
	 ables	delaying  of TCP acknowledgments. Using this option improves la-
	 tency at the expense of throughput. Type of this option is int. Default
	 value is 0.

EXAMPLE
	 nn_bind (s1, "tcp://*:5555");
	 nn_connect (s2, "tcp://myserver:5555");

SEE ALSO
     nn_inproc(7) nn_ipc(7) nn_bind(3) nn_connect(3) nanomsg(7)

AUTHORS
     Martin Sustrik <sustrik@250bpm.com>

				   2018-10-15			       NN_TCP(7)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=nn_tcp&sektion=7&manpath=FreeBSD+Ports+15.1.quarterly>

home | help