Merge pull request #973 from penberg/flush

Add flush() to front-end messages
This commit is contained in:
Steven Fackler 2022-12-30 08:33:07 -05:00 committed by GitHub
commit 9774c330f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -271,6 +271,12 @@ where
})
}
#[inline]
pub fn flush(buf: &mut BytesMut) {
buf.put_u8(b'H');
write_body(buf, |_| Ok::<(), io::Error>(())).unwrap();
}
#[inline]
pub fn sync(buf: &mut BytesMut) {
buf.put_u8(b'S');