Struct nng::DialerBuilder [−][src]
pub struct DialerBuilder { /* fields omitted */ }
Configuration utility for NNG 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.
Implementations
impl DialerBuilder
[src]
impl DialerBuilder
[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 DialerBuilder::start
.
Errors
AddressInvalid
: An invalid url was specified.Closed
: The socket is not open.OutOfMemory
: Insufficient memory available.
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.
Errors
Closed
: The socket is not open.ConnectionRefused
: The remote peer refused the connection.ConnectionReset
: The remote peer reset the connection.DestUnreachable
: The remote address is not reachable.OutOfMemory
: Insufficient memory available.PeerAuth
: Authentication or authorization failure.Protocol
: A protocol error occurred.
Trait Implementations
impl Drop for DialerBuilder
[src]
impl Drop for DialerBuilder
[src]impl GetOpt<KeepAlive> for DialerBuilder
[src]
impl GetOpt<KeepAlive> for DialerBuilder
[src]impl GetOpt<LocalAddr> for DialerBuilder
[src]
impl GetOpt<LocalAddr> for DialerBuilder
[src]impl GetOpt<MaxTtl> for DialerBuilder
[src]
impl GetOpt<MaxTtl> for DialerBuilder
[src]impl GetOpt<NoDelay> for DialerBuilder
[src]
impl GetOpt<NoDelay> for DialerBuilder
[src]impl GetOpt<Protocol> for DialerBuilder
[src]
impl GetOpt<Protocol> for DialerBuilder
[src]impl GetOpt<Raw> for DialerBuilder
[src]
impl GetOpt<Raw> for DialerBuilder
[src]impl GetOpt<ReconnectMaxTime> for DialerBuilder
[src]
impl GetOpt<ReconnectMaxTime> for DialerBuilder
[src]impl GetOpt<ReconnectMinTime> for DialerBuilder
[src]
impl GetOpt<ReconnectMinTime> for DialerBuilder
[src]impl GetOpt<RecvBufferSize> for DialerBuilder
[src]
impl GetOpt<RecvBufferSize> for DialerBuilder
[src]impl GetOpt<RecvMaxSize> for DialerBuilder
[src]
impl GetOpt<RecvMaxSize> for DialerBuilder
[src]impl GetOpt<RecvTimeout> for DialerBuilder
[src]
impl GetOpt<RecvTimeout> for DialerBuilder
[src]impl GetOpt<ResendTime> for DialerBuilder
[src]
impl GetOpt<ResendTime> for DialerBuilder
[src]impl GetOpt<SendBufferSize> for DialerBuilder
[src]
impl GetOpt<SendBufferSize> for DialerBuilder
[src]impl GetOpt<SendTimeout> for DialerBuilder
[src]
impl GetOpt<SendTimeout> for DialerBuilder
[src]impl GetOpt<SocketName> for DialerBuilder
[src]
impl GetOpt<SocketName> for DialerBuilder
[src]impl GetOpt<SurveyTime> for DialerBuilder
[src]
impl GetOpt<SurveyTime> for DialerBuilder
[src]impl GetOpt<Url> for DialerBuilder
[src]
impl GetOpt<Url> for DialerBuilder
[src]impl SetOpt<CaFile> for DialerBuilder
[src]
impl SetOpt<CaFile> for DialerBuilder
[src]impl SetOpt<CertKeyFile> for DialerBuilder
[src]
impl SetOpt<CertKeyFile> for DialerBuilder
[src]impl SetOpt<KeepAlive> for DialerBuilder
[src]
impl SetOpt<KeepAlive> for DialerBuilder
[src]impl SetOpt<NoDelay> for DialerBuilder
[src]
impl SetOpt<NoDelay> for DialerBuilder
[src]impl SetOpt<Protocol> for DialerBuilder
[src]
impl SetOpt<Protocol> for DialerBuilder
[src]impl SetOpt<ReconnectMaxTime> for DialerBuilder
[src]
impl SetOpt<ReconnectMaxTime> for DialerBuilder
[src]impl SetOpt<ReconnectMinTime> for DialerBuilder
[src]
impl SetOpt<ReconnectMinTime> for DialerBuilder
[src]impl SetOpt<RecvMaxSize> for DialerBuilder
[src]
impl SetOpt<RecvMaxSize> for DialerBuilder
[src]impl SetOpt<RequestHeaders> for DialerBuilder
[src]
impl SetOpt<RequestHeaders> for DialerBuilder
[src]Auto Trait Implementations
impl RefUnwindSafe for DialerBuilder
impl RefUnwindSafe for DialerBuilder
impl Send for DialerBuilder
impl Send for DialerBuilder
impl Sync for DialerBuilder
impl Sync for DialerBuilder
impl Unpin for DialerBuilder
impl Unpin for DialerBuilder
impl UnwindSafe for DialerBuilder
impl UnwindSafe for DialerBuilder