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
1 answer

How does performance of TCP and Unix Domain Sockets scale with number of processes and payload size?

Say I've a server on the same machine as some workers, each of which is talking to it. They could be talking over TCP or Unix Domain Sockets. How does the performance scale with number of workers and message size? When I speak of performance, I'm…
Nikhil Garg
  • 3,944
  • 9
  • 30
  • 37
0
votes
0 answers

Android:Alternative for TCP loopback socket connection for better performance

Developed a networking library using Android NDK (2.3 and above) Scenerio Third-party application (TCP socket based ) communicates to our native library. Our library processes that data and in turns communicates to a server using TCP socket…
Rohit
  • 6,941
  • 17
  • 58
  • 102
0
votes
2 answers

Write separate messages with unix domain sockets

I am currently learning to program with unix domain sockets and I have a question about it. What is the standard way to separate message? E.g. A server writes two messages and the client needs can do two reads to get the message. I guess I could…
Benedikt Bünz
  • 648
  • 7
  • 22
0
votes
1 answer

How to get telnet session's remote port number?

I am trying to get the TCP port number which is used by a remote user's telnet connection. In case of ssh connection, I am able to get it from SSH_CLIENT env variable, but how to get it in case of telnet connection. Are there any C/Unix APIs to get…
Ram
  • 1,153
  • 4
  • 16
  • 34
0
votes
2 answers

change linux socket file permissions

First, yes this is related to this stack overflow question, but I'm having a slightly different set of circumstances and my post there is not getting an answer. So, on my Dell desktop workstation, Ubuntu 10.04 32 bit, I have developed a server…
Wes Miller
  • 2,191
  • 2
  • 38
  • 64
0
votes
1 answer

Unix Domain sockets (C) - Client "deletes" socket on connect()?

This may be a bit difficult to enumerate succinctly but I will give it my best on my novice understanding of the domain and problem. I have 2 processes, one stream server who first unlinks, creates a socket descriptor, binds, listens, and accepts on…
5k1zk17
  • 369
  • 1
  • 4
  • 11
-1
votes
1 answer

Problem with unix sockets, when setting up docker with ngnix, daphne/django and redis

I have no programming background, I just started my first web project, so there is not much background knowledge, please keep that in mind. My project has run so far with wsl ubuntu on my windows machine, but I wanted to transfer it to docker. The…
-1
votes
1 answer

tor.service starts but unix socket not work

I am wonna set my own site in Tor network with .onion domain on Ubuntu 22.04.2 LTS. I am install tor, nginx and configure nginx and /etc/tor/torrc file to work with unix socket. /etc/tor/torrc config line added: HiddenServiceDir…
-1
votes
1 answer

Bidirectional communication of Unix sockets

I'm trying to create a server that sets up a Unix socket and listens for clients which send/receive data. I've made a small repository to recreate the problem. The server runs and it can receive data from the clients that connect, but I can't get…
mattlennon3
  • 1
  • 1
  • 3
-1
votes
1 answer

Read system call returning zero bytes though the socket is ready for read

I have a client-server application in c which is using unix domain socket. Here server is reading a integer from client. Client successfully sends a 4 bytes to server. but at the server end I could see that the read system call is reading 0 bytes…
Cracken
  • 306
  • 2
  • 5
  • 17
-1
votes
1 answer

How to send haproxy info log to rsyslog via unix sock?

Hi i'm trying to config haproxy/rsyslog so that ONLY haproxy info log is sent to ryslog via unix sock. Here my config: haproxy config frontend MY_FRONT_END log 127.0.0.1 /var/log/haproxy/dev/log info bind *:12080 default_backend…
jAckOdE
  • 2,402
  • 8
  • 37
  • 67
-1
votes
1 answer

Cannot printf Client sun_path unix domain socket

Here UNix Domain server and client code that I am using. Server and Client messages each other by receiving message from each other. Server code sents message to Client by from recvfrom by populating client_address. Moreover as u can see this unix…
Meric Ozcan
  • 678
  • 5
  • 25
-1
votes
1 answer

Why does recv() give me errno 88 when accept works?

Why do I get errno 88 for recv() in the following code? I seem to be using the right socket and accept seems to work. The program runs fine, I can connect from a client, but as soon as I send a single byte of data, recv() fails. I am using the…
turf
  • 101
  • 3
-1
votes
1 answer

How to select in Go?

In Unix select is used to wait for more than one input source. Select waits until one input source becomes ready. How to do this in Go? I found a Select in Go but this seams to be a thin wrapper around the Unix function, because it works on file…
ceving
  • 21,900
  • 13
  • 104
  • 178
-1
votes
1 answer

TCP Socket: How to use FD_ISSET() on server to detect client's sending data?

I have a server which has several sockets connected with counterpart clients, I want to use select() to detect whether a client is sending data to the counterpart socket. My code is: fd_set player_fd_set; FD_ZERO(&player_fd_set); int max_fd =…
OEurix
  • 393
  • 4
  • 19
1 2 3
46
47