Communicating between NodeJS and C using node-ipc and unix sockets

2016-10-04T07:26:51

I want to communicate between NodeJS and a C program using node-ipc, over a Unix socket, which according to that homepage is the fastest option. (They will be on the same machine). That package claims it could communicate with a C program. (I had to sanity check).

The problem is the examples don't give example C code, and I have next to no idea how I'd get them to talk.

Can anyone point me to an example of C code to match those client/server examples? For example, how would I adapt this tutorial on working with unix pipes in C (Assuming I'm not completely off track?! Maybe it's "domain sockets" that I want instead?) None of this is making any sense to me, I'm missing something crucial.

Copyright License:
Author:「Jodes」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/39841942/communicating-between-nodejs-and-c-using-node-ipc-and-unix-sockets

About “Communicating between NodeJS and C using node-ipc and unix sockets” questions

I want to communicate between NodeJS and a C program using node-ipc, over a Unix socket, which according to that homepage is the fastest option. (They will be on the same machine). That package cla...
This question follows on from the following: Communicating between NodeJS and C using node-ipc and unix sockets In regards to the accepted solution (https://stackoverflow.com/a/39848936/1834057),...
I'm breaking a big application into several processes and I want each process to communicate with each other. for now it's gonna be on the same server, but later several servers on same local netw...
I want to pass messages between a Node.js server and a C program that is forked by the Nodejs server. I know there are a lot of possibilities. Here is one on StackOverflow. However, I want the ligh...
AFAIK, if a unix socket is created as type SOCK_STREAMS then it's unidirectional, and if SOCK_DGRAM then it's bidirectional. I'm looking at using node-ipc for IPC via unix sockets. It has an examp...
Quick and basic nodeJs question, I'm working with unix socket for inter-server communication between c++ application and my NodeJs server, I've wrote my nodeJs server like so: var net = require('...
I have a C library and a C-based server and am trying to interact with my Node.js server. The two will always be on the same machine. I have two options to send the data from the C-server to the Node
Our application will have a website and a mobile app both communicating to the same API backend. I have one Nodejs application for serving only APIs and a second Nodejs app serving html pages for the
I'm trying to communicate with Nginx docker from docker hub without using network stack (unix sockets only) I tried to create my own socket: python -c "import socket as s; sock = s.socket(s.AF_UNI...
I'm trying to use UNIX domain sockets to communicate between a C program, and a Python script. The Python script sends data via UNIX domain sockets to the C program. Here is the relevant code from...

Copyright License:Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.