Questions tagged [unix-socket]

UNIX domain sockets are a technology for interprocess communication on a single computer.

UNIX domain sockets are a technology for interprocess communication on a single computer. They allow processes on the same machine to establish bidirectional connections to exchange either continuous byte streams or datagram messages.

The API is in many places the same as the one used for TCP/IP network sockets. A UNIX domain socket listening for connections may be represented as an inode in the file system, depending on the operating system and the parameters used to bind that socket.

Unix Domain Sockets can only communicate within a Linux OS kernel, they can not communicate externally to a kernel.

Details are provided in the unix(7) man page.

699 questions
0
votes
2 answers

Debugging connect syscall with strace – what does @"sun_path" mean?

I've got two programs in different languages attempting to connect to a local abstract socket on a Linux system. One of the two is failing. I am having difficulty determining why. I just want to know what the one difference I can find in the strace…
Vivian
  • 1,539
  • 14
  • 38
0
votes
0 answers

Networking and multihreading in C++. Errors and how to make my code design better?

I am trying to create a simple local server that accepts connections on a different thread. I am trying to create a simple backup program for my files(kinda a like dumbed down cloud for my house). I have setup all the networking things in different…
Bipul Adh
  • 103
  • 1
  • 2
  • 6
0
votes
1 answer

Weird order after select() (with FD_SET())

I am developing a multi-client Unix Domain Socket to transfer data through multiple processes. I found some code that implements chat between every client and stuff but I want that once a client send something to the server, the server reply back…
Raphaël
  • 117
  • 1
  • 1
  • 10
0
votes
1 answer

How to make sure data over UNX Sockets gets sent in order using Twisted Python

With my current setup, I'm running a server with Django and I'm trying to automate backing up to the cloud whenever a POST/PUT action is made. To circumvent the delay (Ping to server hovers around 100ms and an action can reach upwards of 10 items…
Lorenzo
  • 133
  • 3
  • 9
0
votes
1 answer

send working only once in the loop

Hi i am trying to work on tcp connection I take the file name from client and send it to server. The server checks if file exits or else it sends the appropriate message. if file exits the data is sent to client i receive the file content only…
kautilya hari
  • 213
  • 1
  • 3
  • 9
0
votes
0 answers

What does 'may fail' in socket() mean?

The socket() function shall fail if: EAFNOSUPPORT The implementation does not support the specified address family. EMFILE All file descriptors available to the process are currently open. ENFILE No more file descriptors…
lz96
  • 2,816
  • 2
  • 28
  • 46
0
votes
0 answers

Is there a possibility to use unix domain socket Tor proxy in phantomjs?

I'm using selenium with phantomjs under Ubuntu 16.04. I want to make use of Tor proxy. There is, of course, possibility to set a proxy via host:port pair like so: from selenium import webdriver service_args = [ '--proxy=127.0.0.1:9050', …
Andrew Kravchuk
  • 356
  • 1
  • 5
  • 17
0
votes
0 answers

node.js domain socket disconnect automatically

My Node.js server is connected to a unix socket developed by C. In each HTTP request, parameter will send to the C program and receive response and send by to client. But after the first request, the socket is disconnected automatically. What is the…
0
votes
1 answer

ZeroMQ IPC Unix Domain Socket accessed by nc

I want to connect to Unix Domain Socket created by ZeroMQ (IPC model) via command nc. I can connect, but when I sending some messages then, my deamon, which is listening to this socket, is not getting any message... I'm using nc like: nc -U…
user3025978
  • 477
  • 2
  • 8
  • 27
0
votes
0 answers

Torusware speedus and Hazelcast

after watching a presentation about how Speedus can optimize 110% the Hazelcast performance I decided to give it a try. I did the following setup, I downloaded the Ubuntu docker image supplied with speedus. My host operating system is MacOs with 8…
Alexander Petrov
  • 9,204
  • 31
  • 70
0
votes
1 answer

setsockopt SO_SNDBUF and its behavior in unix domain

I have a test unix domain server which has the following SO_SNDBUF is set to 1024000 while connection come in : for ( ; ; ) { connfd = accept(fdfromps, 0, 0); int new_size = 1024000 ; setsockopt(connfd, SOL_SOCKET, SO_SNDBUF ,…
barfatchen
  • 1,630
  • 2
  • 24
  • 48
0
votes
2 answers

Yet another confustion about sending/recieving large amount of data over (unix-) socket

I have a C++ program which reads frames from a high speed camera and write each frame to a socket (unix socket). Each write is of 4096 bytes. Each frame is roughly 5MB. ( There is no guarantee that frame size would be constant but it is always a…
Dilawar
  • 5,438
  • 9
  • 45
  • 58
0
votes
0 answers

getaddrinfo error:ai_socktype not supported

I am writing one code which tell the ip address of domain. The following code works fine. #include #include #include #include #include #include #include …
Dineshkp
  • 1
  • 2
0
votes
0 answers

Unix sockets doesn't work with PHP on Apache

I wrote a following short script in PHP: I user this code to connect to a simple server that prints everything it receives…
fqrt
  • 21
  • 2
0
votes
1 answer

C- program using fork won't exit after user inputs 'exit'

We were tasked to create a two-way communication simulation in one c code. It's my first time dabbling with this kind of code so I have created this simple code: #include #include #include #include…