diff --git a/examples/EchoServer.cpp b/examples/EchoServer.cpp index c029a28..928160b 100644 --- a/examples/EchoServer.cpp +++ b/examples/EchoServer.cpp @@ -33,7 +33,10 @@ int main() { }, .message = [](auto *ws, std::string_view message, uWS::OpCode opCode) { - ws->send(message, opCode, true); + /* This is the opposite of what you probably want; compress if message is LARGER than 16 kb + * the reason we do the opposite here; compress if SMALLER than 16 kb is to allow for + * benchmarking of large message sending without compression */ + ws->send(message, opCode, message.length() < 16 * 1024); }, .drain = [](auto */*ws*/) { /* Check ws->getBufferedAmount() here */