nn_connect man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

NN_CONNECT(3)			nanomsg manual			 NN_CONNECT(3)

NAME
       nn_connect - add a remote endpoint to the socket

SYNOPSIS
       #include <nanomsg/nn.h>

       int nn_connect (int s, const char *addr);

DESCRIPTION
       Adds a remote endpoint to the socket s. The library would then try to
       connect to the specified remote endpoint.

       The addr argument consists of two parts as follows:
       transport://address. The transport specifies the underlying transport
       protocol to use. The meaning of the address part is specific to the
       underlying transport protocol.

       For the list of available transport protocols check the list on
       nanomsg(7) manual page.

       Maximum length of the addr parameter is specified by NN_SOCKADDR_MAX
       defined in <nanomsg/nn.h> header file.

       Note that nn_connect and nn_bind(3) may be called multiple times on the
       same socket thus allowing the socket to communicate with multiple
       heterogeneous endpoints.

RETURN VALUE
       If the function succeeds positive endpoint ID is returned. Endpoint ID
       can be later used to remove the endpoint from the socket via
       nn_shutdown(3) function.

       If the function fails negative value is returned and errno is set to to
       one of the values defined below.

ERRORS
       EBADF
	   The provided socket is invalid.

       EMFILE
	   Maximum number of active endpoints was reached.

       EINVAL
	   The syntax of the supplied address is invalid.

       ENAMETOOLONG
	   The supplied address is too long.

       EPROTONOSUPPORT
	   The requested transport protocol is not supported.

       ENODEV
	   Address specifies a nonexistent interface.

       ETERM
	   The library is terminating.

EXAMPLE
	   s = nn_socket (AF_SP, NN_PUB);
	   eid1 = nn_connect (s, "ipc:///tmp/test.ipc");
	   eid2 = nn_connect (s, "tcp://server001:5560");

SEE ALSO
       nn_inproc(7) nn_ipc(7) nn_tcp(7) nn_socket(3) nn_bind(3) nn_shutdown(3)
       nanomsg(7)

AUTHORS
       Martin Sustrik <sustrik@250bpm.com[1]>

NOTES
	1. sustrik@250bpm.com
	   mailto:sustrik@250bpm.com

nanomsg Unknown			  12/23/2015			 NN_CONNECT(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net