@@ -11,7 +11,7 @@ int main() {
1111 /* Simple echo websocket server, using multiple threads */
1212 std::vector<std::thread *> threads (std::thread::hardware_concurrency ());
1313
14- std::transform (threads.begin (), threads.end (), threads.begin (), [](std::thread *t ) {
14+ std::transform (threads.begin (), threads.end (), threads.begin (), [](std::thread */*t*/ ) {
1515 return new std::thread ([]() {
1616
1717 /* Very simple WebSocket echo server */
@@ -23,26 +23,26 @@ int main() {
2323 .maxBackpressure = 1 * 1024 * 1024 ,
2424 /* Handlers */
2525 .upgrade = nullptr ,
26- .open = [](auto *ws ) {
26+ .open = [](auto */*ws*/ ) {
2727
2828 },
2929 .message = [](auto *ws, std::string_view message, uWS::OpCode opCode) {
3030 ws->send (message, opCode);
3131 },
32- .drain = [](auto *ws ) {
32+ .drain = [](auto */*ws*/ ) {
3333 /* Check getBufferedAmount here */
3434 },
35- .ping = [](auto *ws ) {
35+ .ping = [](auto */*ws*/ ) {
3636
3737 },
38- .pong = [](auto *ws ) {
38+ .pong = [](auto */*ws*/ ) {
3939
4040 },
41- .close = [](auto *ws , int code, std::string_view message) {
41+ .close = [](auto */*ws*/ , int /* code*/ , std::string_view /* message*/ ) {
4242
4343 }
44- }).listen (9001 , [](auto *token ) {
45- if (token ) {
44+ }).listen(9001 , [](auto *listen_socket ) {
45+ if (listen_socket ) {
4646 std::cout << " Thread " << std::this_thread::get_id () << " listening on port " << 9001 << std::endl;
4747 } else {
4848 std::cout << " Thread " << std::this_thread::get_id () << " failed to listen on port 9001" << std::endl;
0 commit comments