upgrade: (res, req, context) => {
console.log('An Http connection wants to become WebSocket, URL: ' + req.getUrl() + '!');
res.writeHeader('Test',123)
/* This immediately calls open handler, you must not use res after this call */
res.upgrade({
url: req.getUrl()
},
/* Spell these correctly */
req.getHeader('sec-websocket-key'),
req.getHeader('sec-websocket-protocol'),
req.getHeader('sec-websocket-extensions'),
context);
},
I Try next code but upgrade is not sended