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:
+1
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user