Skip to content

Commit

Permalink
Merge pull request #35 from fawdlstty/master
Browse files Browse the repository at this point in the history
add flush method
  • Loading branch information
courvoif authored Dec 25, 2023
2 parents b84ebe5 + 6141053 commit 3d336d3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pcap/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ impl<W: Write> PcapWriter<W> {
}
}

/// Flush data
pub fn flush(&mut self) -> PcapResult<()> {
self.writer.flush().map_err(PcapError::IoError)
}

/// Returns the endianess used by the writer.
pub fn endianness(&self) -> Endianness {
self.endianness
Expand Down

0 comments on commit 3d336d3

Please sign in to comment.