util/ForeignFifoBuffer: add method GetAvailable()

This commit is contained in:
Max Kellermann
2014-08-06 17:52:56 +02:00
parent f89da17827
commit 08fee9a284
2 changed files with 6 additions and 1 deletions

View File

@@ -171,6 +171,10 @@ public:
tail += n;
}
constexpr size_type GetAvailable() const {
return tail - head;
}
/**
* Return a buffer range which may be read. The buffer pointer is
* writable, to allow modifications while parsing.