Page 1 of 1

Intercept Websocket messages

Posted: Mon Jan 22, 2024 8:06 pm
by darkducke
Hello, I access a page that opens a connection with a websocket and sends and receives messages, using the devtools of the MiniBrowser example, I can see these messages by selecting the websocket url, and in the "Messages" tab next to the "Headers" tab, my The question is, how to intercept these messages through Chromium? the websocket connection url wss://xxx... does not appear in LoadEnd, is there any event that allows me to obtain this url?

Thanks in advance!

Re: Intercept Websocket messages

Posted: Tue Jan 23, 2024 6:45 am
by salvadordf
Hi,

CEF doesn't expose any event to intercept webcokets but you can use the Network.webSocketFrameReceived DevTools method :
https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketFrameReceived

Re: Intercept Websocket messages

Posted: Wed Jan 24, 2024 2:18 pm
by darkducke
Thanks for the way, I managed to get the data by opening a WebSocket connection with devtools!

:D