[][src]Struct nng::DialerOptions

pub struct DialerOptions { /* fields omitted */ }

Configuration utility for nanomsg-next-generation dialers.

This object allows for the configuration of dialers before they are started. If it is not necessary to change dialer settings or to close the dialer without closing the socket, then Socket::dial provides a simpler interface and does not require tracking an object.

Methods

impl DialerOptions[src]

pub fn new(socket: &Socket, url: &str) -> Result<Self>[src]

Creates a new dialer object associated with the given socket.

Note that this does not start the dialer. In order to start the dialer, this object must be consumed by DialerOptions::start.

pub fn start(self, nonblocking: bool) -> Result<Dialer, (Self, Error)>[src]

Cause the dialer to start connecting to the address with which it was created.

Normally, the first attempt to connect to the dialer's address is done synchronously, including any necessary name resolution. As a result, a failure, such as if the connection is refused, will be returned immediately, and no further action will be taken.

However, if nonblocking is specified, then the connection attempt is made asynchronously.

Furthermore, if the connection was closed for a synchronously dialed connection, the dialer will still attempt to redial asynchronously.

The returned handle controls the life of the dialer. If it is dropped, the dialer is shut down and no more messages will be received on it.

Trait Implementations

Auto Trait Implementations

Blanket Implementations

impl<T> Options for T where
    T: HasOpts, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]