pub struct DatagramFlow { /* private fields */ }Expand description
Combination of DatagramIncoming and DatagramOutgoing
Implementations§
Source§impl DatagramFlow
impl DatagramFlow
Sourcepub fn new(local_max_datagram_frame_size: u64, tx_wakers: ArcSendWakers) -> Self
pub fn new(local_max_datagram_frame_size: u64, tx_wakers: ArcSendWakers) -> Self
Creates a new instance of DatagramFlow.
This method takes local protocol parameter max_datagram_frame_size,
the local’s transport parameter max_datagram_frame_size limits the size of the datagram frames that peer
can send.
pub fn try_load_data_into<P>(&self, packet: &mut P) -> Result<(), Signals>
Sourcepub fn reader(&self) -> Result<DatagramReader>
pub fn reader(&self) -> Result<DatagramReader>
Create a new unique instance of DatagramReader.
Return an error if the connection is closing or already closed, or datagram is disenabled by local.
See DatagramIncoming::new_reader for more details.
Sourcepub fn writer(&self, max_datagram_frame_size: u64) -> Result<DatagramWriter>
pub fn writer(&self, max_datagram_frame_size: u64) -> Result<DatagramWriter>
Create a new instance of DatagramWriter.
Return an error if the connection is closing or already closed,
or datagram is disenabled by peer(max_datagram_frame_size is 0)
See DatagramOutgoing::new_writer for more details.
Sourcepub fn on_conn_error(&self, error: &Error)
pub fn on_conn_error(&self, error: &Error)
See DatagramOutgoing::on_conn_error and DatagramIncoming::on_conn_error for more details.
Trait Implementations§
Source§impl Clone for DatagramFlow
impl Clone for DatagramFlow
Source§fn clone(&self) -> DatagramFlow
fn clone(&self) -> DatagramFlow
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DatagramFlow
impl Debug for DatagramFlow
Source§impl ReceiveFrame<(DatagramFrame, Bytes)> for DatagramFlow
See DatagramIncoming::recv_datagram for more details.
impl ReceiveFrame<(DatagramFrame, Bytes)> for DatagramFlow
See DatagramIncoming::recv_datagram for more details.