gRPC IPC between Go and C++ on Windows - c++

I am failing to allow ipc between Go and C++ over sockets on Windows.
I have a C++ app and a Go app on Windows (10/11) where I need IPC between the apps. I have been trying out gRPC and it worked over a localhost channel perfectly but the firewall popup is not ideal. It looks like grpc++ doesn't support named pipes but finding out if I can switch to sockets on the C++ side is a little less clear.
Trying TestClient client(grpc::CreateChannel("unix:grpctest", grpc::InsecureChannelCredentials()));
just results in:
DNS resolution failed for unix:grpctest: C-ares status is not ARES_SUCCESS qtype=A name=unix is_balancer=0: Domain name not found
Does anybody know if this is possible?

Related

Options to move C++ TCP server application to web

I have a C++ GDB Server application that runs on host and is currently integrated with Eclipse CDT to provide debugging support on different hardware platforms. Below is overall structure of it:
Eclipse CDT <-----> GDB <-------> MYGDBServerApp <------> Hardware Platform
This app listens on a port for communication with GDB. This works perfectly fine in desktop environment.
I am now evaluating options to move whole solution to web. For this, I need to move this native C++ GDB server application to web as well. For Cloud based IDE, I am using Eclipse Theia project and have developed an extension for it. Now, I am looking for options to somehow use this C++ application from browser as well.
I have tried to compile this app to WASM using emscripten but I ran into different problems. One problem is socket communication. As WASM script will be running in browser, it cannot open TCP sockets for communication. It can only use websockets and Emscripten documentation suggests to use some proxy server (websockify) to translates WebSockets traffic to normal TCP socket traffic.
I have following questions:
What are recommended options to use such application from browser?
Has someone tried this proxy-server approach in similar scenario. As per Emscripten documentation, This emulation is not very complete at the moment, it is likely that you will run into problems out of the box
Is there any other better approach to reuse/port this application to web?

Inter process communication between Electron app and Win32 native desktop app

I am trying to implement inter process communication between a desktop native app and an electron app on Windows for assignement(Operating systems).
I am new to this area and not able to find relevant links.
The options I have considered are:
1. TCP
2. HTTP server
3. COM
4. Namedpipes
NamedPipes seem correct, as electron implements its IPC using named pipes. There is a net module available which implements sockets that seem to be similar.
And I can write the server in the native app.
Does this sound correct to you guys? Any better alternatives? Any suggestions which will help me learn will be useful.
Check out the library node-ipc https://github.com/RIAEvangelist/node-ipc which has a range of ways by which you can communicate between node (which is what basically electron is) and other system level processes.

UWP application refuses to receive data in P2P server part

I am trying to create P2P(UDP) windows 10 UWP application written in c++ using networking library written in C (tried both enet and libuv).
The problem is when the app is acting like client everything works as expected, but when I am testing the server part the application refuse to receive any events (connection in enet and messages from libuv). I tried the code from simple console applications and it works for both enet and libuv!
Also I added rules in the firewall to allow everything on the default port.
My question is, do I need to make additional configurations for the UWP application for receiving?
According to your description on your same thread in MSDN, the server and the client are on the same device.
According to the note of DatagramSocket official sample:
Network communications using an IP loopback address cannot normally be used for interprocess communication between a Universal Windows Platform (UWP) app and a different process (a different UWP app or a desktop app) because this is restricted by network isolation.
We cannot communicate a uwp app with other apps in a same machine. Not even with a loopback exemption. This is as design. If you use a c# console project as server and a uwp app as client, they may communicate successfully. But it need special steps (E.g. run the console as administrator) to let it work which you may happen to meet the requirements. Details you can reference this thread.

Socket communication between c++ Client and node.js Server

I want to make my c++ app (running on Linux system) to connect and send data to node.server via socket.
I tried to implement small sample app by using socket.io library (https://github.com/uning/socket.io-client-cpp), but doesnt helping me to achieve my goal.
Any guidance on this or alternative to do something like this.

Detect devices on local network for client-server connection in C++

I'm trying to implement an auto-connect feature for my Android application DroidPad, which is basically a TCP server running on an Android phone which the PC application connects to.
To make the process easier for the user, is there any way in (portable?) C++ to scan the IP addresses on the local subnet, possibly ones with a certain open port? I've tried using UDP broadcasting, but couldn't get it to work. I'm currently using the wxWidgets toolkit for GUI and libraries.
Any ideas?
I found a solution: wxServDisc. It uses mDNS (aka Zeroconf / Bonjour) to discover devices on a subnet, and is also based on wxWidgets.