AK: Expose Buffered's buffer size and underlying stream
This commit is contained in:
parent
6f74c1bb11
commit
cbb2b4fe71
Notes:
sideshowbarker
2024-07-18 00:34:17 +09:00
Author: https://github.com/kleinesfilmroellchen Commit: https://github.com/SerenityOS/serenity/commit/cbb2b4fe716 Pull-request: https://github.com/SerenityOS/serenity/pull/10331 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/Hendiadyoin1 Reviewed-by: https://github.com/alimpfard
1 changed files with 4 additions and 0 deletions
|
@ -108,6 +108,10 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
size_t buffered() const { return m_buffered; }
|
||||
// Reading from the stream returned here will most definitely brick the buffering behavior of Buffered.
|
||||
StreamType& underlying_stream() { return m_stream; }
|
||||
|
||||
private:
|
||||
Bytes buffer() const { return { m_buffer, Size }; }
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue