ClientRead: "close" flushes the output buffer
Add a new CommandResult code called "FINISH" which, unlike "CLOSE", will attempt to flush the output buffer. This is a one-shot attempt; it will do one write, and not try again.
This commit is contained in:
@@ -57,6 +57,11 @@ Client::OnSocketInput(void *data, size_t length)
|
||||
main_loop->Break();
|
||||
return InputResult::CLOSED;
|
||||
|
||||
case CommandResult::FINISH:
|
||||
if (Flush())
|
||||
Close();
|
||||
return InputResult::CLOSED;
|
||||
|
||||
case CommandResult::CLOSE:
|
||||
Close();
|
||||
return InputResult::CLOSED;
|
||||
|
Reference in New Issue
Block a user