All Questions
Tagged with unix-socket node.js
44 questions
1
vote
1
answer
466
views
How to properly implement Node.js communication over Unix Domain sockets?
I'm debugging my implementation of an IPC between multithreaded node.js instances.
As datagram sockets are not supported natively, I use the default stream protocol, with simple application-level ...
1
vote
1
answer
1k
views
Calling open() on a Unix domain socket failed with error "No such device or address"
I'm trying to communicate between NodeJS and C program using named pipes in linux. My server program has written in NodeJS:
'use strict';
const net = require('net');
const pipename = '/tmp/pipe1';
...
0
votes
1
answer
262
views
Messages are large, You may want to consider smaller messages. node-ipc and swift (OSX)
I have a node app that is trying to communicate with a swift application using a unix socket.
I am broadcasting a Message ever 3 seconds using the following code with node-ipc:
const ipc = require('...
1
vote
1
answer
934
views
NodeJS net.Socket: `connect` vs `ready` event
I had hard time debugging a problem with my NodeJS' code today.
I have problems when I open two connections to the same unix socket (reasons though); and for unknown reasons, sometimes it works fine ...
3
votes
2
answers
2k
views
How to communicate locally between a Node.js (pref. Express module) server and a C++ application using IPC (Unix Domain Sockets)
I have one machine running simultaniously some C++ application and a Node.js server.
Use-case:
I want to be able to trigger my C++ application and make it pass some data (lets say a string) into a ...
2
votes
1
answer
1k
views
Example of c++ client and node.js server
I have a problem... I'm trying to connect my client written in c++ to my server written in nodejs but I couldn't do. How can i receive data in the server? With this code I receive the client ...
1
vote
0
answers
397
views
Connecting to unix socket inside docker container using nodejs
I have written an app which connect to an already created unix.sock file and get some data from it. But I am getting EACCES error while try to connect. Error message is given below.
{ Error: connect ...
0
votes
1
answer
146
views
Unable to communicate between Node.js domain socket server and C domain socket client on Linux
Here is the Node.js code:
net = require('net');
fs = require('fs');
serverSocketFile = '/tmp/_mediaComm';
if (fs.existsSync(serverSocketFile))
fs.unlinkSync(...
1
vote
0
answers
67
views
Can i serve multiple ghost blog service without NGINX?
I'm using a web hosting service and I don't have permission to install NGINX, only listening on port 8080. so, I am looking for a way to use Unix Socket using Express. How can I solve this problem?
...
0
votes
1
answer
514
views
Why does my Node.js server echo back everything I send to it from nc?
I am new to Node.js and I'm trying to learn by building a server that listens to a Unix-domain socket. I'm testing my server using 'nc' as a client. 'nc -U /var/run/ipc.sock' Everything is going ...
1
vote
0
answers
400
views
Node.js - How to check if Unix Domain Socket exists in Node.js?
I am writing a docker client in Node.js. It must connect to unix domain socket /var/run/docker.sock if it exists or fallback to TCP socket, typically tcp://localhost:2375 (when client is running on ...
1
vote
1
answer
936
views
node-ipc error "Messages are large, You may want to consider smaller messages."
So I am trying to setup a socket server in node.js using node-ipc, then send data from a client. I can connect perfectly fine, however when I send data I recieve the error Messages are large, You may ...
0
votes
1
answer
2k
views
EPROTOTYPE error whilst attempting to connect node.js unix socket client to C program
I'm rewriting a PHP application in Node.js.
A C program runs on the Linux OS that also hosts PHP.
In short, the C program handles sending data from the PHP web interface to some proprietary hardware. ...
2
votes
1
answer
1k
views
Communicating between C and NodeJS using node-ipc and unix sockets
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 ...
2
votes
2
answers
2k
views
NodeJS MongoDB UNIX socket connection
In a nodeJS app, I'd want to connect to my MongoDB database via its UNIX socket /tmp/mongdb-27017.sock. I use the package https://mongodb.github.io/node-mongodb-native/?jmp=docs (version 3.1.6), this ...