Fix -Wunused-parameter
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "App.h"
|
||||
|
||||
struct us_listen_socket_t *listen_socket;
|
||||
struct us_listen_socket_t *global_listen_socket;
|
||||
|
||||
int main() {
|
||||
/* ws->getUserData returns one of these */
|
||||
@@ -25,28 +25,28 @@ int main() {
|
||||
/* Exit gracefully if we get a closedown message (ASAN debug) */
|
||||
if (message == "closedown") {
|
||||
/* Bye bye */
|
||||
us_listen_socket_close(0, listen_socket);
|
||||
us_listen_socket_close(0, global_listen_socket);
|
||||
ws->close();
|
||||
}
|
||||
|
||||
/* Simply broadcast every single message we get */
|
||||
ws->publish("broadcast", message, opCode, true);
|
||||
},
|
||||
.drain = [](auto *ws) {
|
||||
.drain = [](auto */*ws*/) {
|
||||
/* Check getBufferedAmount here */
|
||||
},
|
||||
.ping = [](auto *ws) {
|
||||
.ping = [](auto */*ws*/) {
|
||||
|
||||
},
|
||||
.pong = [](auto *ws) {
|
||||
.pong = [](auto */*ws*/) {
|
||||
|
||||
},
|
||||
.close = [](auto *ws, int code, std::string_view message) {
|
||||
.close = [](auto */*ws*/, int /*code*/, std::string_view /*message*/) {
|
||||
/* We automatically unsubscribe from any topic here */
|
||||
}
|
||||
}).listen(9001, [](auto *token) {
|
||||
listen_socket = token;
|
||||
if (token) {
|
||||
}).listen(9001, [](auto *listen_socket) {
|
||||
global_listen_socket = listen_socket;
|
||||
if (listen_socket) {
|
||||
std::cout << "Listening on port " << 9001 << std::endl;
|
||||
}
|
||||
}).run();
|
||||
|
||||
Reference in New Issue
Block a user