is a data communications endpoint for exchanging data between processes executing within the same host operating system.

learn more… | top users | synonyms

3
votes
1answer
758 views

How to send data from serial port over wifi?

I have microcontroller device which reads data from sensors and sends it via Serial to USB converter (ftdi232 cable). This Serial to USB converter is connected to ARMv7 mini-computer - CuBox with ...
0
votes
0answers
6 views

recvfrom does not receive anything from the client, but the client is sending the info [migrated]

So I wanted to make sure I am not missing something and I have the concepts clean in my head. This is the part of the code I have: UDP_Msg mensajeRecibidoUdp; struct sockaddr_in c_ain; ...
0
votes
0answers
8 views

Internal Socket Receive Buffer Implementation [closed]

I’m working on an embedded application, where i receive some sensor values over UDP. The board I’m using runs the 2.4 kernel on an ARM processor. The problem is the following: once my internal socket ...
1
vote
2answers
7k views

ssh: Read from socket failed: Connection reset by peer

When I try to ssh to a remote host, I get the following error messages: root@cloudstack-server-1:~/.ssh# ssh ubuntu@172.17.4.17 -v OpenSSH_5.9p1 Debian-5ubuntu1.1, OpenSSL 1.0.1 14 Mar 2012 ...
4
votes
1answer
76 views

How does moving a unix domain socket enable socat to monitor traffic?

socat can be used to monitor traffic across a Unix domain socket: sudo mv /path/to/sock /path/to/sock.original sudo socat -t100 -x -v UNIX-LISTEN:/path/to/sock,mode=777,reuseaddr,fork ...
1
vote
0answers
14 views

Which Privileges Should Assign For Create Raw Sockets

I want to run an ICMP command to ping an IP Adress at Java: InetAddress.getByAddress("XXX.XXX.XXX.XXX".getBytes()).isReachable(1000); However there is a security restriction that: Normal users are ...
17
votes
4answers
1k views

Are Unix Internet sockets files?

I understand that "Everything is a file" is one of the major concepts of Unix, but sockets use different APIs that are provided by the kernel (like socket, sendto, recv, etc.), not like normal file ...
1
vote
0answers
32 views

Unix domain Sockets - Size limitation? [closed]

I have the following scenario I created a socket with socat - unix-listen:/tmp/socket.sock then I wrote a very long string (abt 40k) with nc -U /tmp/socket.sock I seted the following parameters ...
0
votes
0answers
31 views

how to fix a port no statically for client request on client side?

I have an assignment to implement: unicast multicast broadcast in Java socket programming. While implementing the multicast part I decided to do it on my own system itself, so for the purpose of ...
1
vote
0answers
72 views

Nginx leaves old socket

I'm running Nginx 1.6.2 (the nginx-full package from the nginx/stable PPA). I'm using the unmodified configuration /etc/nginx/nginx.conf: user www-data; worker_processes 4; pid /run/nginx.pid; ...
1
vote
1answer
14 views

How to apply a parameter to packet so TC can prioritize\classify it

I want to add a parameter to the packet so that I can later let TC (HTB in specific) prioritize my packet (based on filtering that parameter). I thought about filtering by socket but as I understand ...
2
votes
1answer
89 views

Advantages of using named pipes and sockets rather than temporary files

I have two cooperating programs. One program just writes its output to a file and the other one then reads from the file and spits the data out for the front end to work with. I have been reading ...
1
vote
3answers
141 views

nc not waiting for server disconnect on OS X

How to make nc client on OS X Mavericks keep socket open and read data until server disconnects the socket? I want to send data to a server through nc and then use the response. Problem is that nc ...
0
votes
0answers
56 views

Stopping syslogd also closes /dev/log UNIX domain socket

I am working on a project and from some testing I found out that stopping syslogd daemon also closes /dev/log socket. Is there some other way so that even if syslogd is down, /dev/log socket still ...
2
votes
0answers
51 views

Emulate console by sending data on one UDP port, and receive text from another

Note: I also posted this question on SuperUser, because I'm not sure where it belongs I'm trying to establish a "console-like" connection with a National Instruments cRIO-FRC. It broadcasts its ...
13
votes
3answers
1k views

Why are TCP/IP sockets considered “open files”?

I need some assistance grasping what I'm sure is a fundamental concept in Linux: the limit for open files. Specifically, I'm confused on why open sockets can count towards the total number of "open ...
1
vote
1answer
61 views

ip forwarding to remotely connect to a socket listening to localhost only?

I must transfer data from PC1 to PC2 using a specific port, but the socket opened on PC2 only listens to local host. Is there a way to "trick" the socket into accepting the connection from PC1?
1
vote
3answers
87 views

Server running on guest Linux VM will not accept connections from Windows host

I have a simple echo server program running on CentOS 7. If I run both the client and the server in the VM, I can connect to the server. I'm using VirtualBox with the "bridged" network configuration. ...
0
votes
0answers
73 views

Archlinux ARM Apache server fails to start

I am currently setting up an Apache web server on my Pi running on Archlinux ARM. After installing and making the first small configurations I have tested it and it works. Then I stop the server and ...
1
vote
0answers
46 views

Why was n't kqueue socket polling mechanism not implemented in Linux?

Linux has epoll for socket polling mechanism. kqueue seems to be better than epoll. Why did linux went with epoll rather than kqueue? I read about libkqueue. But that is implemented in user space and ...
2
votes
0answers
108 views

X11 bad access at first try but working on successive tries

I use the following setup to forward X11 output from my local machine to the server. I will outline the setup: X11 server and the client are on the same local machine. The X11 server runs on my ...
0
votes
1answer
55 views

What are the differences between socket polling mechanisms of kqueue and epolling?

kqueue socket polling mechanism is used in FreeBSD and epolling in Linux. I would like to know what are the differences between the two mechanisms?
2
votes
1answer
56 views

Is there a system call to bind a file descriptor directly into another?

A read() & write() loop would probably be as good as what I'm looking for, but nevertheless is anything like that around or is it impossible because of an obstacle I didn't envisage ? I'm curious
0
votes
0answers
62 views

closing socket after forcing terminal close

I'm running Bluetooth socket server, this server is listening to incoming connection. but I forced the terminal close ctrl + Z . after that the server is not listeing any more and show me the output ...
3
votes
1answer
38 views

Can close() block?

For example, if you close a pipe or socket that still has data in its write buffer that hasn't been read by the process on the other end, does close() block until the data is read or the other process ...
0
votes
0answers
34 views

A script to identify whether a file descriptor has gone bad

Problem : I have a server program running which connects to a remote program using TCP sockets. There many of them (say 20). My problem is one of the socket descriptor has gone bad and has recieved ...
2
votes
0answers
42 views

Last data traffic time for a TCP socket

Is it possible, to find out when was the last time there was any traffic on an opened TCP socket? Keepalive and timeout timers are based on this statistic, so I guess it has to be stored somewhere. ...
22
votes
2answers
5k views

Who's got the other end of this unix socketpair?

I want to determine what process has the other end of a unix socket, that was created with socketpair(). I have a program parent which creates a socketpair(AF_UNIX, SOCK_STREAM, 0, fds), and fork()s. ...
3
votes
2answers
3k views

How to 'strace' a unix domain socket?

Kind of hard to explain but I noticed when straceing the PID that has the socket open I cannot see any of the communication. How can I sit in the middle of a socket file to watch communication?
6
votes
2answers
3k views

How to make a TCP socket time out

For network catastrophe simulations of our server environment, we are looking for a way to intentionally timeout a TCP socket. Are there any simple ways for existing sockets? Also, little C test-case ...
1
vote
1answer
183 views

How can I allow applications to bind to any address in a subnet assigned to an interface?

I recently got a static IPv6 /56 prefix of my own from Freenet6, and am trying to allow applications to bind arbitrary addresses in the prefix. I modified the tunnel creation script that gogoc uses in ...
2
votes
1answer
457 views

Memcache 'stats' reports non-zero 'curr_connections' - but lsof shows no socket connections

Our memcache daemon reports non-zero 'curr_connections'... $ telnet memcache-server 11211 Escape character is '^]'. stats ... STAT curr_connections 12 ... ...and yet, lsof shows no socket ...
8
votes
3answers
894 views

Is there a file for each socket?

"Everything is a file" in the UNIX World. Above sentence is famous. When I run echo "hello programmer" >> /dev/tty1 , I can watch the given string on TeleType 1 , .... What and where is file ...
2
votes
2answers
99 views

Detect open sockets manually (not using nc or similar)?

I'm trying to debug a network problem on a embedded system which has a very limited set of userspace applications. Meaning I can't use any of the following sudo lsof -i sudo netstat -lptu sudo ...
1
vote
1answer
116 views

How to see the amount of pending data on a unix domain socket?

When I'm logged to a tmux session from two different computers, I'd like to be able to trace the amount of pending data on the sockets of both tmux session. To test this I logged to computer A and to ...
3
votes
2answers
800 views

Socket connect to a ports bound to IP vs localhost

It is my understanding that sockets bound to ports using localhost will not be visible to the subnet because the binding is not with the nic IP address. Local processes connecting to such port will ...
2
votes
1answer
366 views

Using a Unix Domain Socket to Control VLC

I am interested in using a UNIX-Domain Socket to control VLC playback. This functionality is outlined in the VideoLan documentation for using oldrc. So what I need to is startup vlc with a command ...
1
vote
0answers
234 views

Which socket is gnome-shell reading from continuously?

strace shows that the GNOME shell is continuously trying to read from a socket, which is often not available (or doesn't contain any data to read from): strace -p gnome-shell-pid -e trace=recvfrom ...
3
votes
1answer
59 views

= sign at the end of .sock files in the ls output

I'm running the zsh shell in emacs. When I run ls I get a = at the end of .sock files. What does the = mean? Is it unique to unix sockets?
1
vote
2answers
583 views

How to “listen” to nginx writes to a file socket

I'm trying to get uwsgi and nginx to play nice. After moving to "file sockets" (hopefully I'm using the right terminology here) from TCP sockets, the only thing I get from uwsgi is a 400 with no ...
9
votes
3answers
11k views

How do I reserve ports for my application?

How do I reserve a list of ports for my custom applications? To be specific, the product I'm creating has a lot of processes and a lot of intercommunication between them. The problem I'm having is ...
4
votes
1answer
113 views

Does traffic addressed to one of a Linux system's own interfaces ever leave the system?

I have two separate servers running on the same port on a Linux system, one binded to the loopback interface, and the other to the public Ethernet interface. If I connect a client on that system to ...
2
votes
2answers
342 views

Which systems do not honor socket read/write permissions?

man 7 unix on Linux states: In the Linux implementation, sockets which are visible in the file system honor the permissions of the directory they are in. Their owner, group and their ...
1
vote
0answers
125 views

Solaris 10 on x86: local sockets (unix domain sockets) very very slow? [closed]

I'm writing an application both on Linux and Solaris 10. It uses local sockets for some internal communications. On Linux an open, exchange one short message & close cycle takes about 10us elapsed ...
15
votes
2answers
7k views

/proc/PID/fd/X link number

In Linux, in /proc/PID/fd/X, the links for file descriptors that are pipes or sockets have a number, like: l-wx------ 1 user user 64 Mar 24 00:05 1 -> pipe:[6839] l-wx------ 1 user user 64 Mar 24 ...
13
votes
1answer
2k views

Kernel socket structure and TCP_DIAG

I'm working on a software which connects to a Real Time data server (using TCP) and I have some connections dropping. My guess is that the clients do not read the data coming from the server fast ...
2
votes
1answer
786 views

Linux nuisance: /dev/stdin doesn't work with sockets

Linux has this blitheringly annoying peculiarity that /dev/stdin won't work with sockets - it is hardcoded to return ENXIO. Try this: socat TCP-OPEN:localhost:1234 EXEC:cat\ /dev/stdin,nofork ...
6
votes
4answers
5k views

How does the server find out what client port to send to?

As I understand it this is what happens when a client makes a connection request: The server will be bound to a particular port number. The port number is always bound to a listening process. Since ...
4
votes
5answers
11k views

How can I tell if a TCP port is open or not? [closed]

I am trying to implement socket programming in C. When I try to connect from a client to a server (Ubuntu), it shows an error like "connection failed". So I think the problem is with the port. I am ...
9
votes
2answers
6k views

Performance of unix sockets vs TCP ports

For example on php-fpm: #listen = 127.0.0.1:9000 listen = /var/run/php-fpm/php-fpm.sock Is there any major performance differences between using unix socket-based listeners over TCP ports? (Not ...