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

How do I prevent socket() system call from returning file descriptor 0,1 or 2?

I am using socketpair() system call for IPC and it returns 0,1 or 2 file descriptor if any of them is available. Using write() system call for fd 0 writes to the STDIN thereby messing up the output of my application. Is there something I can do to…
-1
votes
1 answer

How to read extract parameters and payload from recv() in C?

I am running a simple client code in C to do POST and GET to server and read data stream. Currently I am printing full response received in recv() and have to parse it for further use. Before reading data stream, I want to know what is HTTP status…
B Patel
  • 1
  • 1
  • 1
-1
votes
1 answer

read bytes from a unix socket and print ip address in c

I have a Java client and a C server that communicate over a unix socket. I want to send an ip address from the client to the server. On the server side when i try to interprete the bytes i receive from the client i get [ 01 01 01 01 ] which is…
Pheonix7
  • 2,131
  • 5
  • 21
  • 38
-1
votes
1 answer

Why "man 7 socket" not work on Mac OSX?

I tried instead "man 2 socket" which gives me a very short description, while I suppose there should be much more if you type "man 7 socket" on Linux. That's pretty strange. Any ideas ?
yuan
  • 317
  • 1
  • 4
  • 12
-2
votes
2 answers

Is it possible for UnixStream::send to return EWOULDBLOCK?

I am using UnixStream and I am not calling set_nonblocking(true). I thought a blocking socket would never return EWOULDBLOCK; is that true?
user855
  • 19,048
  • 38
  • 98
  • 162
-2
votes
1 answer

PHP: mysqli_connect - No such file or directory when using localhost socket

I am migrating from mysql to mysqli.Currently my server is running pdo, mysql and mysqli at the same time. Also the PHP 5.6.34 is running in a docker. MySQL version is 10.2.16-MariaDB-log MariaDB Server, which is running on the host machine. OS is…
Ihidan
  • 419
  • 1
  • 6
  • 20
-2
votes
1 answer

server crash or just call `shutdown(fd, SHUT_WR)`?

When server crash or just call shutdown(fd, SHUT_WR), client all read() return 0. How to distinguish them? I will appreciate it if you help me.
Yunbin Liu
  • 1,484
  • 2
  • 11
  • 20
-2
votes
1 answer

Error: struct sockaddr_un' has no member named 'sun_port'

I'm getting a few errors trying to make a simple unix socket program. So far, I have the server program working. I'm trying to write a programs that lets the client repeatedly send messages to the server program, and the server will display them.…
user7520896
-2
votes
1 answer

SSH set non default port

I am trying to change default port of SSH from 22 to 2292, Host: RHEL 7.1 I have tried: 1)vi /etc/ssh/sshd_config #Port 22 Port 2292 2)reboot Error ssh -p 2292 root@lrmi079.pll.domin.com ssh: connect to host lrmi079.pll.domin.com port 2292: No…
Malatesh
  • 1,944
  • 6
  • 26
  • 39
1 2 3
46
47