Switch to single-threaded epoll-based operation
This commit is contained in:
@@ -6,14 +6,8 @@ class StreamBuffer : public Buffer {
|
||||
public:
|
||||
StreamBuffer(int sock, size_t size);
|
||||
|
||||
[[nodiscard]] bool BufferAtLeast(size_t len);
|
||||
[[nodiscard]] const char *Read(size_t len) override;
|
||||
template<class T> [[nodiscard]] const T *ReadObj();
|
||||
[[nodiscard]] bool Refill();
|
||||
|
||||
private:
|
||||
int sock_;
|
||||
};
|
||||
|
||||
template<class T> const T *StreamBuffer::ReadObj() {
|
||||
return reinterpret_cast<const T*>(Read(sizeof(T)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user