#include <nanomsg/nn.h> int nn_connect(int sock, const char *url)
|This documentation is for the TIP (development tree) of NNG and may represent unreleased changes or functionality that is experimental, and is subject to change before release. The latest released version is v1.3.2. See the documentation for v1.3.2 for the most up-to-date information.|
nn_connect - connect to remote peer (compatible API)
nn_connect() function arranges for the socket sock to
initiate connection to a peer at the address specified by url.
An identifier for this socket’s association with the url is
returned to the caller on success.
This identifier can be used with
remove the association later.
|This function is provided for API compatibility with legacy libnanomsg. Consider using the relevant modern API instead.|
|The connect operation is performed asynchronously, and may not have completed before this function returns control to the caller.|
Only transports supported by legacy libnanomsg may be
used with this function.
In particular, only the schemes
This function returns a positive identifier success, and -1 on error.
The connection attempt was refused.
The socket sock is not open.
An invalid url was supplied.