Add .dropped events for pub/sub backpressure notification

This commit is contained in:
Alex Hultman
2023-11-30 17:40:15 +01:00
parent bc2815d95b
commit 973a975915
4 changed files with 12 additions and 0 deletions
+3
View File
@@ -38,6 +38,9 @@ int main() {
* benchmarking of large message sending without compression */
ws->send(message, opCode, message.length() < 16 * 1024);
},
.dropped = [](auto */*ws*/, std::string_view /*message*/, uWS::OpCode /*opCode*/) {
/* A message was dropped due to set maxBackpressure and closeOnBackpressureLimit limit */
},
.drain = [](auto */*ws*/) {
/* Check ws->getBufferedAmount() here */
},