1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-08-31 10:46:58 +02:00

Framed::is_write_buf_empty() checks if write buffer is flushed

This commit is contained in:
Nikolay Kim
2018-11-17 18:46:26 -08:00
parent 29fe995a02
commit 410204a41e
5 changed files with 22 additions and 2 deletions

View File

@@ -135,6 +135,11 @@ impl<T, U> Framed<T, U> {
&mut self.inner.get_mut().get_mut().0
}
/// Check if write buffer is empty.
pub fn is_write_buf_empty(&self) -> bool {
self.inner.get_ref().is_empty()
}
/// Check if write buffer is full.
pub fn is_write_buf_full(&self) -> bool {
self.inner.get_ref().is_full()