({ websocket, handshakeResponse })
| 210 | // undici:websocket:open fires when the connection is established, but this results |
| 211 | // in an inaccurate stack trace. |
| 212 | function onWebSocketOpen({ websocket, handshakeResponse }) { |
| 213 | websocket[kInspectorRequestId] = getNextRequestId(); |
| 214 | const url = websocket.url.toString(); |
| 215 | Network.webSocketCreated({ |
| 216 | requestId: websocket[kInspectorRequestId], |
| 217 | url, |
| 218 | }); |
| 219 | Network.webSocketHandshakeResponseReceived({ |
| 220 | requestId: websocket[kInspectorRequestId], |
| 221 | timestamp: getMonotonicTime(), |
| 222 | response: handshakeResponse, |
| 223 | }); |
| 224 | } |
| 225 | |
| 226 | function onWebSocketClose({ websocket }) { |
| 227 | if (typeof websocket[kInspectorRequestId] !== 'string') { |
nothing calls this directly
no test coverage detected
searching dependent graphs…