[−][src]Function tcb::graph::communication::sender::check_buffer_flush
pub fn check_buffer_flush(
sender_timeout_flag: &mut bool,
stream: &mut BufWriter<TcpStream>,
buffered_messages: &mut usize,
buffered_bytes: &mut u64,
timeout: &mut Duration,
configuration: &Arc<Configuration>,
error: bool
)
Checks if its necessary to write the bytes from the buffer to the TCP stream.
Arguments
sender_timeout_flag
- Flag for determining if the reading timeout has expired.
stream
- TCP stream between the peers.
buffered_messages
- Number of buffered messages.
buffered_bytes
- Number of buffered bytes.
timeout
- Timeout duration.
configuration
- Middleware configuration.
error
- Flag for determining if the reading from the channel threw an error.