#include <nng/nng.h> typedef struct nng_dialer_s nng_dialer;
nng_dialer is a handle to a “dialer” object, which is responsible for
creating a single
nng_pipe at a time by
establishing an outgoing connection.
If the connection is broken, or fails, the dialer object will automatically attempt to reconnect, and will keep doing so until the dialer or socket is destroyed.
Dialer objects are created by the
nng_dial() functions, and are always “owned”
by a single
|The client/server relationship described by dialer/listener is completely orthogonal to any similar relationship in the protocols. For example, a rep socket may use a dialer to connect to a listener on an req socket. This orthogonality can lead to innovative solutions to otherwise challenging communications problems.|
Dialer objects may be destroyed by the
They are also closed when their “owning” socket is closed.
A dialer may be initialized using the macro
before it is opened, to prevent confusion with valid open dialers.