[−][src]Struct nng::ListenerOptions
Configuration utility for nanomsg-next-generation listeners.
This object allows for the configuration of listeners before they are
started. If it is not necessary to change listener settings or to close the
listener without closing the socket, then Socket::listen
provides a
simpler interface and does not require tracking an object.
Methods
impl ListenerOptions
[src]
pub fn new(socket: &Socket, url: &str) -> Result<Self>
[src]
Creates a new listener object associated with the given socket.
Note that this does not start the listener. In order to start the
listener, this object must be consumed by ListenerOptions::start
.
pub fn start(self, nonblocking: bool) -> Result<Listener, (Self, Error)>
[src]
Cause the listener to start listening on the address with which it was created.
Normally, the act of "binding" to the address indicated by url is
done synchronously, including any necessary name resolution. As a
result, a failure, such as if the address is already in use, will be
returned immediately. However, if nonblocking
is specified then this
is done asynchronously; furthermore any failure to bind will be
periodically reattempted in the background.
The returned handle controls the life of the listener. If it is dropped, the listener is shut down and no more messages will be received on it.
Trait Implementations
impl GetOpt<LocalAddr> for ListenerOptions
[src]
impl GetOpt<Raw> for ListenerOptions
[src]
impl GetOpt<RecvBufferSize> for ListenerOptions
[src]
impl GetOpt<RecvTimeout> for ListenerOptions
[src]
impl GetOpt<SendBufferSize> for ListenerOptions
[src]
impl GetOpt<Url> for ListenerOptions
[src]
impl GetOpt<SendTimeout> for ListenerOptions
[src]
impl GetOpt<SocketName> for ListenerOptions
[src]
impl GetOpt<MaxTtl> for ListenerOptions
[src]
impl GetOpt<ResendTime> for ListenerOptions
[src]
impl GetOpt<SurveyTime> for ListenerOptions
[src]
impl GetOpt<NoDelay> for ListenerOptions
[src]
impl GetOpt<KeepAlive> for ListenerOptions
[src]
impl SetOpt<RecvMaxSize> for ListenerOptions
[src]
impl SetOpt<NoDelay> for ListenerOptions
[src]
impl SetOpt<KeepAlive> for ListenerOptions
[src]
impl SetOpt<CaFile> for ListenerOptions
[src]
impl SetOpt<CertKeyFile> for ListenerOptions
[src]
impl SetOpt<ResponseHeaders> for ListenerOptions
[src]
impl SetOpt<Permissions> for ListenerOptions
[src]
impl Drop for ListenerOptions
[src]
impl Debug for ListenerOptions
[src]
Auto Trait Implementations
impl Send for ListenerOptions
impl Sync for ListenerOptions
impl Unpin for ListenerOptions
impl UnwindSafe for ListenerOptions
impl RefUnwindSafe for ListenerOptions
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,