You've already forked cpp-httplib
Refactor streams: rename is_* to wait_* for clarity (#2069)
- Replace is_readable() with wait_readable() and is_writable() with wait_writable() in the Stream interface. - Implement a new is_readable() function with semantics that more closely reflect its name. It returns immediately whether data is available for reading, without waiting. - Update call sites of is_writable(), removing redundant checks.
This commit is contained in:
committed by
GitHub
parent
a4b2c61a65
commit
550f728165
@ -25,7 +25,9 @@ public:
|
||||
|
||||
bool is_readable() const override { return true; }
|
||||
|
||||
bool is_writable() const override { return true; }
|
||||
bool wait_readable() const override { return true; }
|
||||
|
||||
bool wait_writable() const override { return true; }
|
||||
|
||||
void get_remote_ip_and_port(std::string &ip, int &port) const override {
|
||||
ip = "127.0.0.1";
|
||||
|
Reference in New Issue
Block a user