mirror of
https://github.com/uNetworking/uWebSockets.js.git
synced 2025-12-19 18:10:26 -05:00
Update Upgrade.js
This commit is contained in:
4
examples/Upgrade.js
vendored
4
examples/Upgrade.js
vendored
@@ -18,7 +18,7 @@ const app = uWS./*SSL*/App({
|
||||
|
||||
/* This immediately calls open handler, you must not use res after this call */
|
||||
res.upgrade({
|
||||
url: req.getUrl()
|
||||
myData: req.getUrl() /* First argument is UserData (see WebSocket.getUserData()) */
|
||||
},
|
||||
/* Spell these correctly */
|
||||
req.getHeader('sec-websocket-key'),
|
||||
@@ -28,7 +28,7 @@ const app = uWS./*SSL*/App({
|
||||
|
||||
},
|
||||
open: (ws) => {
|
||||
console.log('A WebSocket connected with URL: ' + ws.url);
|
||||
console.log('A WebSocket connected with URL: ' + ws.myData);
|
||||
},
|
||||
message: (ws, message, isBinary) => {
|
||||
/* Ok is false if backpressure was built up, wait for drain */
|
||||
|
||||
Reference in New Issue
Block a user