Peer to Peer Render Process communication

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Peer to Peer Render Process communication

Postby nvine » Fri Mar 15, 2013 3:21 am

Hello,
I have a scenario in which there is an application with multiple Cef3 browser instances. These browser instances need to communicate with each other, like ex: access some css properties in each other's DOM etc.,
Does Cef3 provide Peer to Peer Render Process communication which correspond to different browsers? From what I have studied, I haven't found any APIs for this. So the method I am planning to employ is,
1. Each renderer process also has a TCP server running in separate thread which receives JSON data, and evaluates the result and returns the JSON.
2. The browser process indicates each render process the port that can be used for communication via CefBrowser::SendProcessMessage
3. The JS in render processes now start communicating via native callbacks which use the socket or pipe to communication with process as described in 1.
Will this approach work or are there any considerations I am missing above?

Also what would be the effort to bring in chrome extension sort of mechanism in CEF3, just curious, since what I am trying to achieve is similar to an extension.

Best Regards,
nvine
Mentor
 
Posts: 56
Joined: Tue Feb 21, 2012 11:13 pm

Re: Peer to Peer Render Process communication

Postby magreenblatt » Fri Mar 15, 2013 9:20 am

Your proposed approach will break once CEF3 supports sandboxing. Instead, you should use IPC via SendProcessMessage and have the browser process route the messages between renderers.

Chrome extensions require a lot of code that doesn't exist and can't easily be ported to CEF3. If you need an extension concept you'll need to implement it in your application.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 229 guests