[−][src]Struct nng::DialerOptions
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
impl GetOpt<LocalAddr> for DialerOptions
[src]
impl GetOpt<Raw> for DialerOptions
[src]
impl GetOpt<ReconnectMinTime> for DialerOptions
[src]
impl GetOpt<ReconnectMaxTime> for DialerOptions
[src]
impl GetOpt<RecvBufferSize> for DialerOptions
[src]
impl GetOpt<RecvMaxSize> for DialerOptions
[src]
impl GetOpt<RecvTimeout> for DialerOptions
[src]
impl GetOpt<SendBufferSize> for DialerOptions
[src]
impl GetOpt<SendTimeout> for DialerOptions
[src]
impl GetOpt<SocketName> for DialerOptions
[src]
impl GetOpt<MaxTtl> for DialerOptions
[src]
impl GetOpt<Url> for DialerOptions
[src]
impl GetOpt<ResendTime> for DialerOptions
[src]
impl GetOpt<SurveyTime> for DialerOptions
[src]
impl GetOpt<NoDelay> for DialerOptions
[src]
impl GetOpt<KeepAlive> for DialerOptions
[src]
impl SetOpt<ReconnectMinTime> for DialerOptions
[src]
impl SetOpt<ReconnectMaxTime> for DialerOptions
[src]
impl SetOpt<RecvMaxSize> for DialerOptions
[src]
impl SetOpt<NoDelay> for DialerOptions
[src]
impl SetOpt<KeepAlive> for DialerOptions
[src]
impl SetOpt<CaFile> for DialerOptions
[src]
impl SetOpt<CertKeyFile> for DialerOptions
[src]
impl SetOpt<RequestHeaders> for DialerOptions
[src]
impl Drop for DialerOptions
[src]
impl Debug for DialerOptions
[src]
Auto Trait Implementations
impl Send for DialerOptions
impl Sync for DialerOptions
impl Unpin for DialerOptions
impl UnwindSafe for DialerOptions
impl RefUnwindSafe for DialerOptions
Blanket Implementations
impl<T> Options for T where
T: HasOpts,
[src]
T: HasOpts,
fn get_opt<T: OptOps>(&self) -> Result<T::OptType> where
Self: GetOpt<T>,
[src]
Self: GetOpt<T>,
fn set_opt<T: OptOps>(&self, val: T::OptType) -> Result<()> where
Self: SetOpt<T>,
[src]
Self: SetOpt<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,