What IPC method should I use between Firefox extension and C# code running on the same machine?

后端 未结 4 1778
野性不改
野性不改 2021-01-03 05:49

I have a question about how to structure communication between a (new) Firefox extension and existing C# code.

The firefox extension will use configuration data and

4条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-03 06:24

    Well if you're going to use JavaScript I don't see another way to use named pipes or other system dependant communication other than writing proxy component in C++ which will allow you to access OS API directly. On the other hand if you plan to use TCP/UDP for IPC it will be much easier for you, because Firefox provides socket services that you can use easily from JavaScript component.

    If blocking is your concern you can use asynchrony socket communication or threading services to avoid locking of Firefox's GUI, but be aware that many objects are accessible only from Firefox's main thread.

提交回复
热议问题