[−][src]Struct nng::Listener
A constructed and running listener.
This listener has already been started on the socket and will continue serving the connection until either it is explicitly close or the owning socket is closed.
Methods
impl Listener
[src]
pub fn new(socket: &Socket, url: &str, nonblocking: bool) -> Result<Self>
[src]
Creates a new listener object associated with the given socket.
Note that this will immediately start the listener so no configuration
will be possible. Use ListenerOptions
to change the listener options
before starting it.
pub fn close(self)
[src]
Closes the listener.
This also closes any Pipe
objects that have been created by the
listener. Once this function returns, the listener has been closed and
all of its resources have been deallocated. Therefore, any attempt to
utilize the listener (with this or any other handle) will result in an
error.
Listeners are implicitly closed when the socket they are associated with is closed. Listeners are not closed when all handles are dropped.
Trait Implementations
impl GetOpt<LocalAddr> for Listener
[src]
impl GetOpt<Raw> for Listener
[src]
impl GetOpt<RecvBufferSize> for Listener
[src]
impl GetOpt<RecvTimeout> for Listener
[src]
impl GetOpt<SendBufferSize> for Listener
[src]
impl GetOpt<Url> for Listener
[src]
impl GetOpt<SendTimeout> for Listener
[src]
impl GetOpt<SocketName> for Listener
[src]
impl GetOpt<MaxTtl> for Listener
[src]
impl GetOpt<ResendTime> for Listener
[src]
impl GetOpt<SurveyTime> for Listener
[src]
impl GetOpt<NoDelay> for Listener
[src]
impl GetOpt<KeepAlive> for Listener
[src]
impl Eq for Listener
[src]
impl Copy for Listener
[src]
impl PartialOrd<Listener> for Listener
[src]
fn partial_cmp(&self, other: &Listener) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialEq<Listener> for Listener
[src]
fn eq(&self, other: &Listener) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Clone for Listener
[src]
fn clone(&self) -> Listener
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Ord for Listener
[src]
fn cmp(&self, other: &Listener) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl Debug for Listener
[src]
impl Hash for Listener
[src]
Auto Trait Implementations
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>,
Reads the specified option from the object.
fn set_opt<T: OptOps>(&self, val: T::OptType) -> Result<()> where
Self: SetOpt<T>,
[src]
Self: SetOpt<T>,
Writes the specified option to the object.
unsafe fn unsafe_get_opt<T: OptOps>(&self) -> Result<T::OptType> where
Self: UnsafeGetOpt<T>,
[src]
Self: UnsafeGetOpt<T>,
Reads the specified option from the object. Read more
unsafe fn unsafe_set_opt<T: OptOps>(&self, val: T::OptType) -> Result<()> where
Self: UnsafeGetOpt<T>,
[src]
Self: UnsafeGetOpt<T>,
Writes the specified option to the object. Read more
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,