Update outdated examples (#1116)

Since v18.0.0 req is no longer passed to the "open" handler. You can access it in the "upgrade" handler instead.
This commit is contained in:
pavulon
2020-10-26 13:08:24 +01:00
committed by GitHub
parent b4e08ffb01
commit 2d65df86c7
3 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ int main(int argc, char **argv) {
.maxPayloadLength = 16 * 1024 * 1024,
.idleTimeout = 10,
/* Handlers */
.open = [](auto *ws, auto *req) {
.open = [](auto *ws) {
std::cout << "WebSocket connected" << std::endl;
/* Access per socket data */
PerSocketData *perSocketData = (PerSocketData *) ws->getUserData();