Closed robert-bitguild closed 3 years ago
Hi,
I can't get the ws url in open or message event. I think it should easy to fetch the url of ws like ws://localhost/abc?abc=xxxx
app.ws('/*', { // config compression: uWS.SHARED_COMPRESSOR, maxPayloadLength: MAX_PAY_LOAD_LENGTH, // 最大传输字节数 1k idleTimeout: IDLE_TIMEOUT, // 心跳间隔
open: (ws, req) => { console.log("123123123123"); ConnectHandler.handle(ws); }, message: (ws, message, isBinary, ...params) => { MessageHandler.handle(app, ws, message); }, close: (ws, code, message) => { CloseHandler.handle(app, ws, SOCKETS); }
// }); });
The req object in open event is always undefined.
Thanks
https://github.com/uNetworking/uWebSockets.js/blob/master/examples/Upgrade.js
Hi,
I can't get the ws url in open or message event. I think it should easy to fetch the url of ws like ws://localhost/abc?abc=xxxx
app.ws('/*', { // config compression: uWS.SHARED_COMPRESSOR, maxPayloadLength: MAX_PAY_LOAD_LENGTH, // 最大传输字节数 1k idleTimeout: IDLE_TIMEOUT, // 心跳间隔
// }); });
The req object in open event is always undefined.
Thanks