2019-05-04 23:21:11 -07:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "buffer.h"
|
|
|
|
|
|
|
|
|
|
namespace firebuf {
|
|
|
|
|
|
|
|
|
|
class StreamBuffer : public Buffer {
|
2019-05-18 12:11:20 -07:00
|
|
|
public:
|
|
|
|
|
StreamBuffer(int sock, size_t size);
|
2019-05-04 23:21:11 -07:00
|
|
|
|
2019-05-18 12:11:20 -07:00
|
|
|
[[nodiscard]] bool Refill();
|
2019-05-04 23:21:11 -07:00
|
|
|
|
2019-05-18 12:11:20 -07:00
|
|
|
private:
|
|
|
|
|
int sock_;
|
2019-05-04 23:21:11 -07:00
|
|
|
};
|
|
|
|
|
|
2019-05-18 12:11:20 -07:00
|
|
|
} // namespace firebuf
|