Websocket communication between browser process and JS

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

Websocket communication between browser process and JS

Postby videoaudio » Wed Oct 28, 2015 8:37 am

Hi,

Is it possible to use Websocket communication between browser/host process and the loaded webpage's JS? in similar terms with 'handling network requests inside of an application' using custom schemes?
I am planning to use it for interactive communication between browser process and JS running on Render process. (trying to avoid callback or window binding way)

is it the possible?, if so suggested method?


Thanks.
videoaudio
Techie
 
Posts: 36
Joined: Tue Feb 17, 2015 10:08 am

Re: Websocket communication between browser process and JS

Postby magreenblatt » Wed Oct 28, 2015 10:13 am

It is not currently possible to intercept/handle WebSocket requests in the same way as HTTP requests. You would likely need to run your own WebSocket server in the browser process using some third-party library.

The recommended method for browser/renderer communication is either XMLHttpRequest which uses the network stack and can be intercepted or something like the generic message router (https://bitbucket.org/chromiumembedded/ ... age-router) which uses IPC.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Websocket communication between browser process and JS

Postby videoaudio » Mon Nov 02, 2015 5:50 am

Thanks for the info.
videoaudio
Techie
 
Posts: 36
Joined: Tue Feb 17, 2015 10:08 am


Return to CEF Discussion

Who is online

Users browsing this forum: No registered users and 32 guests