Skip to content
This repository has been archived by the owner on Jan 15, 2023. It is now read-only.

Duplex communication like Electron.Net IPC #33

Closed
GammaSoul opened this issue Jun 8, 2018 · 4 comments
Closed

Duplex communication like Electron.Net IPC #33

GammaSoul opened this issue Jun 8, 2018 · 4 comments

Comments

@GammaSoul
Copy link

GammaSoul commented Jun 8, 2018

Hi does this have duplex Communication between c# layer and JavaScript layer?
from what I’ve seen its more of a one way Restful client / server setup from JavaScript at the moment....
how do i also communicate with JavaScript layer from c# layer....
I’m really just looking to shoot messages both ways asynchronously
Im Using CefSharp version but if CefGlue is easyier please let me know....
Regards

@mattkol
Copy link
Member

mattkol commented Jun 9, 2018

Duplex communication is not supported out of the box at the moment. You may have to extend Chromely to achieve that.

  1. For CefSharp, to call JavaScript from C# you can extend CefSharpBrowserHost.cs. You need the browser object.

  2. You can use sockets. There is an explanation here and here.

  3. For CefGlue, what I have tried locally is implement CefGlue Http/WebSockets Server - Cef CefServer. At the moment, I don't have the bandwidth to complete it and fully support it. May be in near future. But you can look into that too.

@GammaSoul
Copy link
Author

Thank you for the pointers i will have a stab at Extending the CefSharp version
Best Regards

@mattkol mattkol closed this as completed Jun 11, 2018
@mattkol
Copy link
Member

mattkol commented Jun 24, 2018

I just added implementation for Duplex/Websocket for CefGlue. Please check it out to see if this is what you need - Real-time with Websocket.

@GammaSoul
Copy link
Author

GammaSoul commented Jul 16, 2018

Hi sorry I only just noticed this, but thanks. I wrote my own extension module on top the CefSharp version that im using. Its like your restful controllers but I can register input and output methods from .Net with corresponding JavaScript code function call in a singleton channel class and can either be one-way single message or return a value both ways between .Net and JavaScript. Thanks a lot for your help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants