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

Non-atomic message sent over Unix Domain socket with file desriptor. Is FD sent twice?

I am developing a client server application where the client application sends different types of messages to server. One type message consists of file descriptor that is to be passed between processes. Generally on Posix API pages, not much…
tcak
  • 2,142
  • 1
  • 16
  • 23
0
votes
1 answer

MediaWiki installation script does not create tables

First - I'm not sure if that's the correct place to post my question hence if I'm wrong doing it here please just let me know and I'll re-post somewhere else. Also I spent whole weekend trying to find out answer to my question with google - no…
Greg0ry
  • 931
  • 8
  • 25
0
votes
1 answer

How to use recv to recieve long text strings

I am trying to create a server and client program that sends a string from client to server where the server executes that string and sends the output back to the client. I am doing this in linux and I am very confused why my program isnt working…
Arman Iqbal
  • 725
  • 2
  • 8
  • 14
0
votes
1 answer

How to run Client-Server on different computers using Sockets in C

I am able to run a client and server on the same computer on two different terminals in Linux. Now I want to run the same model on two different computers. I am guessing there is more to this than just changing the IP address and the port number to…
user2058668
  • 231
  • 1
  • 3
  • 12
0
votes
1 answer

Node.js Express sessions using connect-redis with Unix Domain Sockets

I am trying to utilize a Redis-based session store using connect-redis, communicating over UNIX Domain Sockets. There is this: Redis Connection via socket on Node.js but the answer is specific to node-redis, and not the connect-redis for Redis…
Bobby
  • 1,439
  • 2
  • 16
  • 30
0
votes
1 answer

Unix Domain Socket Error Codes?

I've been occasionally reviewing an unsolved mystery on a Solaris 10 setup we have been running, and I noticed something in the error message that might yield a clue to help me solve the mystery. The error message is when connecting to MySQL on a…
700 Software
  • 85,281
  • 83
  • 234
  • 341
0
votes
1 answer

Unix Domain Socket Code Fails on Embedded Device

I've added a Unix domain socket to a project I'm working on. The socket has a simple function, it simply broadcasts data that the code extracts from another device, the idea is that other applications will be able to read this data from the…
James
  • 3,957
  • 4
  • 37
  • 82
0
votes
1 answer

How to do Tornado HTTPServer with bind_unix_sock?

I've got a simple server. It works if I do a normal socket, but if I try to use a unix socket, I don't think it's working. Here is the server: from tornado.httpserver import HTTPServer import tornado.ioloop from tornado.netutil import…
Gattster
  • 4,613
  • 5
  • 27
  • 39
0
votes
1 answer

Memory Error with UDP socket timeout loop

I'm writing a UDP send/receive function that will timeout when it doesn't get a reply within a certain time, and will resend the packet. I'm using socksetopt to set the timeout and it all seems to work until I get to the final iteration and then a…
James
  • 3,957
  • 4
  • 37
  • 82
0
votes
1 answer

bind error in android socket in a sample executable binary

I have made an executable binary built through android ndk. I put the binary in /data/local/tmp. In the binary I try to bind a socket which I later on want to listen through my android app. I have got root permissions still the bind shows 30 as…
tariq zafar
  • 659
  • 7
  • 24
0
votes
2 answers

sys/socket missing member for msgdr: msg_control, msg_controllen, msg_flags

I'm trying to write a little Client-Server application using the UNIX DOMAIN SOCKETS. I'm using the msghdr for the sendmsg/recvmsg but when I compile the following code, it gives me the following error: include ... struct msghdr…
Mario
  • 978
  • 2
  • 11
  • 31
0
votes
1 answer

how do I get a remote global link addr by it's local-link addr?

I get a Routing Information Protocol(RIP) packet, and I can get the link-local addr of the source router from this packet. But I cannot set the route by the link-local addr, I need a global link addr of the source router. How should I write the code…
zack1030
  • 7
  • 2
0
votes
1 answer

Close socket opened by zsocket in zsh

I've done: % zmodload zsh/net/socket % zsocket -d 20 MY_SOCKET # used the socket a bit Now how do I close the socket's FD? (FD 20 here.)
Thanatos
  • 42,585
  • 14
  • 91
  • 146
0
votes
2 answers

socket close inside fork c++

I am trying socket programming and with the server code: while(1) { sin_size = sizeof (their_addr); new_fd = accept(sockfd,(struct sockaddr *)&their_addr, &sin_size); if(new_fd == -1) { perror("accept"); continue; …
Ravi Nankani
  • 539
  • 1
  • 7
  • 15
0
votes
1 answer

Can't connect a Unix domain socket using Python: No such file or directory

I have several pieces of codes to establish a Unix domain socket and a service using this socket. While there are some confusing errors here leading to a failure. the code that creats the Unix domain socket is written in c: #include…
Kalzium
  • 3
  • 1
  • 5