/usr/share/doc/libnanomsg-dev/nn_connect.txt is in libnanomsg-dev 0.8~beta+dfsg-1+b1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | 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
linknanomsg: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 linknanomsg: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 linknanomsg: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
--------
linknanomsg:nn_inproc[7]
linknanomsg:nn_ipc[7]
linknanomsg:nn_tcp[7]
linknanomsg:nn_socket[3]
linknanomsg:nn_bind[3]
linknanomsg:nn_shutdown[3]
linknanomsg:nanomsg[7]
AUTHORS
-------
Martin Sustrik <sustrik@250bpm.com>
|