Struct ssdp::SSDPReceiver [] [src]

pub struct SSDPReceiver<T> {
    // some fields omitted
}

A non-blocking SSDP message receiver.

Methods

impl<T> SSDPReceiver<T> where T: FromRawSSDP + Send + 'static
[src]

fn new(socks: Vec<UdpSocket>, time: Option<Duration>) -> Result<SSDPReceiver<T>>

Construct a receiver that receives bytes from a number of UdpSockets and tries to construct an object T from them. If a duration is provided, the channel will be shutdown after the specified duration.

Due to implementation details, none of the UdpSockets should be bound to the default route, 0.0.0.0, address.

impl<T> SSDPReceiver<T>
[src]

fn try_recv(&self) -> Result<(T, SocketAddr)TryRecvError>

Non-blocking method that attempts to read a value from the receiver.

fn recv(&self) -> Result<(T, SocketAddr)RecvError>

Blocking method that reads a value from the receiver until one is available.

Trait Implementations

impl<'a, T> IntoIterator for &'a SSDPReceiver<T>
[src]

type Item = (T, SocketAddr)

The type of the elements being iterated over.

type IntoIter = Iter<'a, (T, SocketAddr)>

Which kind of iterator are we turning this into?

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

impl<'a, T> IntoIterator for &'a mut SSDPReceiver<T>
[src]

type Item = (T, SocketAddr)

The type of the elements being iterated over.

type IntoIter = Iter<'a, (T, SocketAddr)>

Which kind of iterator are we turning this into?

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

impl<T> IntoIterator for SSDPReceiver<T>
[src]

type Item = (T, SocketAddr)

The type of the elements being iterated over.

type IntoIter = SSDPIter<T>

Which kind of iterator are we turning this into?

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more

impl<T> Drop for SSDPReceiver<T>
[src]

fn drop(&mut self)

A method called when the value goes out of scope. Read more