Skip to content

Commit 9774c33

Browse files
authored
Merge pull request sfackler#973 from penberg/flush
Add flush() to front-end messages
2 parents 97db777 + d368475 commit 9774c33

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

postgres-protocol/src/message/frontend.rs

+6
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,12 @@ where
271271
})
272272
}
273273

274+
#[inline]
275+
pub fn flush(buf: &mut BytesMut) {
276+
buf.put_u8(b'H');
277+
write_body(buf, |_| Ok::<(), io::Error>(())).unwrap();
278+
}
279+
274280
#[inline]
275281
pub fn sync(buf: &mut BytesMut) {
276282
buf.put_u8(b'S');

0 commit comments

Comments
 (0)