Enum message_io::network::adapter::AcceptedType [−][src]
pub enum AcceptedType<'a, R> {
Remote(SocketAddr, R),
Data(SocketAddr, &'a [u8]),
}
Expand description
Used as a parameter callback in Local::accept()
Variants
Remote(SocketAddr, R)
The listener has accepted a remote (R
) with the specified addr.
The remote will be registered in order to generate read events. (calls to
Remote::receive()
).
A crate::network::NetEvent::Accepted
will be generated once this remote resource
is considered ready.
Tuple Fields of Remote
0: SocketAddr
1: R
Data(SocketAddr, &'a [u8])
The listener has accepted data that can be packed into a message from a specified addr.
Despite of Remote
, accept as a Data
will not register any Remote.
This will produce a crate::network::NetEvent::Message
event.
The endpoint of this event will be unique containing the specified addr and the listener
whom generates it.
Tuple Fields of Data
0: SocketAddr
1: &'a [u8]