diff options
author | Chris Wilson <chris+github@qwirx.com> | 2008-08-21 11:05:38 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2008-08-21 11:05:38 +0000 |
commit | 67279841cd455a04470515dd9e4db0cd7af46651 (patch) | |
tree | 42cf7f37a2ab5d13208a7ef362d60fa506f17f50 /lib/common/IOStream.h | |
parent | 96c337af8c1b79911fe0268db9337970f794094c (diff) |
Add a Flush() method to IOStream to read and discard all remaining data,
and a SelfFlushingStream class which can be used to ensure that protocol
streams are always flushed, to avoid breaking protocol.
Diffstat (limited to 'lib/common/IOStream.h')
-rw-r--r-- | lib/common/IOStream.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/common/IOStream.h b/lib/common/IOStream.h index 042ccca4..fc9f8a97 100644 --- a/lib/common/IOStream.h +++ b/lib/common/IOStream.h @@ -57,6 +57,7 @@ public: // Utility functions bool ReadFullBuffer(void *pBuffer, int NBytes, int *pNBytesRead, int Timeout = IOStream::TimeOutInfinite); bool CopyStreamTo(IOStream &rCopyTo, int Timeout = IOStream::TimeOutInfinite, int BufferSize = 1024); + void Flush(int Timeout = IOStream::TimeOutInfinite); static int ConvertSeekTypeToOSWhence(int SeekType); }; |