This would solve...
Node.js is currently developing WebSocket inspection support in DevTools, but at the moment it can only handle WebSocket open and close events.
Reference:
nodejs/node#59404
I’d like to request further support for the data needed by the DevTools inspector.
The implementation should look like...
1. undici:websocket:created
Required for Network.webSocketCreated.
undici:websocket:open fires after the handshake, so we need an event that fires when the WebSocket object is created.
Spec:
https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketCreated
2. undici:websocket:handshakeRequest
Required forNetwork.requestWillBeSent.
We need a hook for the moment when the HTTP upgrade request is sent.
Spec:
https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-requestWillBeSent
3. undici:websocket:frameSent undici:websocket:frameRecieved
{ websocket, opcode, mask, payloadData }
Required for:
Network.webSocketFrameSent
Network.webSocketFrameReceived
Spec:
https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketFrameSent
https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketFrameReceived
https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-WebSocketFrame
4. WebSocket frame error event
Required for Network.webSocketFrameError.
Undici currently has socket_error,
but it does not indicate which WebSocket instance the error belongs to—unlike other WebSocket events.
I have also considered...
Additional context
I understand that some of these events may require consideration, but I’d appreciate it if you could start by supporting the ones that are feasible.
This would solve...
Node.js is currently developing WebSocket inspection support in DevTools, but at the moment it can only handle WebSocket open and close events.
Reference:
nodejs/node#59404
I’d like to request further support for the data needed by the DevTools inspector.
The implementation should look like...
1.
undici:websocket:createdRequired for
Network.webSocketCreated.undici:websocket:openfires after the handshake, so we need an event that fires when the WebSocket object is created.Spec:
https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketCreated
2.
undici:websocket:handshakeRequestRequired for
Network.requestWillBeSent.We need a hook for the moment when the HTTP upgrade request is sent.
Spec:
https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-requestWillBeSent
3.
undici:websocket:frameSentundici:websocket:frameRecievedRequired for:
Network.webSocketFrameSentNetwork.webSocketFrameReceivedSpec:
https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketFrameSent
https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketFrameReceived
https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-WebSocketFrame
4. WebSocket frame error event
Required for
Network.webSocketFrameError.Undici currently has
socket_error,but it does not indicate which WebSocket instance the error belongs to—unlike other WebSocket events.
I have also considered...
Additional context
I understand that some of these events may require consideration, but I’d appreciate it if you could start by supporting the ones that are feasible.