res.tryEnd returns [ok, hasResponded]
This commit is contained in:
+4
-3
@@ -213,9 +213,10 @@ public:
|
|||||||
internalEnd(data, data.length(), false);
|
internalEnd(data, data.length(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Try and end the response. Returns true on success. Starts a timeout in some cases. */
|
/* Try and end the response. Returns [true, true] on success.
|
||||||
bool tryEnd(std::string_view data, int totalSize = 0) {
|
* Starts a timeout in some cases. Returns [ok, hasResponded] */
|
||||||
return internalEnd(data, totalSize, true);
|
std::pair<bool, bool> tryEnd(std::string_view data, int totalSize = 0) {
|
||||||
|
return {internalEnd(data, totalSize, true), hasResponded()};
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Write parts of the response in chunking fashion. Starts timeout if failed. */
|
/* Write parts of the response in chunking fashion. Starts timeout if failed. */
|
||||||
|
|||||||
Reference in New Issue
Block a user