Struct unreliable_message::network::Receiver
[−]
[src]
pub struct Receiver { pub datagram_length: u16, pub max_connection_size: Option<usize>, pub filter: ReceiverFilter, // some fields omitted }
The receiving end of an unreliable message socket.
Fields
datagram_length | |
max_connection_size | |
filter |
Methods
impl Receiver
fn from_socket(socket: UdpSocket, datagram_length: u16, max_connection_size: Option<usize>, filter: ReceiverFilter) -> Receiver
Constructs a receiver from a socket.
datagram_length
is the max-size of the UDP packet that you expect to
receive.
fn poll(&mut self) -> UnrResult<(SocketAddr, CompleteMessage)>
Blocks until a completed message is received, and returns the Socket Address that the message came from.
fn clear_addr(&mut self, addr: &SocketAddr)
Removes all stored incomplete messages from a specific address.