forked from boostorg/beast
Tune up static_buffer (API Change):
The static buffer is updated: * reset() is no longer a member. Use b.consume(b.size()) instead. * Simplified implementaton, uses asio instead of custom types * Better stream performance: consuming the input makes room available in the output. This class is now suitable for HTTP reads. These changes permit the static_buffer wrapper to adapt a user memory buffer if desired, including a stack based array. The static_buffer_n class may also be used for this purpose, it comes with its own storage.
This commit is contained in:
@@ -75,7 +75,7 @@ private:
|
||||
return static_cast<std::size_t>(last - first);
|
||||
}
|
||||
|
||||
char* p_;
|
||||
char* begin_;
|
||||
char* in_;
|
||||
char* out_;
|
||||
char* last_;
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
std::size_t
|
||||
capacity() const
|
||||
{
|
||||
return dist(p_, end_);
|
||||
return dist(begin_, end_);
|
||||
}
|
||||
|
||||
/// Get a list of buffers that represent the input sequence.
|
||||
|
||||
Reference in New Issue
Block a user