Inverted control flow, engine as library

This commit is contained in:
2021-10-04 17:45:18 -04:00
parent e0fdb2d42f
commit bc22dc89af
15 changed files with 387 additions and 136 deletions

View File

@@ -266,6 +266,11 @@ public:
// Frees up as much space as possible.
void clear();
// Attempt to do a "readline". If there is no newline in
// the buffer, returns empty string. If there is a newline,
// returns a block of text that ends in newline.
std::string readline();
// Write block of bytes into the buffer.
//
// Caution: this function doesn't write the length!