Skip to content

Commit

Permalink
AK: Add remaining method to ConstrainedStream
Browse files Browse the repository at this point in the history
Simply returns how many bytes can be read from the stream.
  • Loading branch information
dzfrias authored and alimpfard committed Jul 9, 2024
1 parent 5382fbb commit aee2f25
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions AK/ConstrainedStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class ConstrainedStream : public Stream {
virtual bool is_eof() const override;
virtual bool is_open() const override;
virtual void close() override;
u64 remaining() const { return m_limit; }

private:
MaybeOwned<Stream> m_stream;
Expand Down

0 comments on commit aee2f25

Please sign in to comment.