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

learn more… | top users | synonyms

1
vote
1answer
12 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
39 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
votes
0answers
25 views

Why configure doesn't search for mysql socket with --with-mysql=mysqlnd option?

I was building php-5.3 on arch linux recently. And one of the problems I encountered was that it didn't work with mysql right away: $ ./php -r 'var_dump(mysql_connect("localhost", "<USER>", ...
0
votes
0answers
28 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
29 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
27 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
71 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
27 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
31 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
49 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
49 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?
1
vote
3answers
90 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 ...
2
votes
1answer
49 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
40 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
31 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
30 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
35 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. ...
6
votes
2answers
994 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
147 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 ...
3
votes
1answer
606 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 ...
1
vote
1answer
5k 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 ...
2
votes
1answer
301 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
525 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
90 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
100 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
579 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
293 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
210 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
52 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
456 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 ...
4
votes
1answer
109 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 ...
1
vote
0answers
111 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 ...
2
votes
1answer
628 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 ...
3
votes
5answers
8k 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 ...
8
votes
1answer
185 views

Can someone explain the different types of unix domain sockets?

If I run netstat --all | grep ^unix some of the socket paths that are outputted are preceded with a '@' and some aren't. I've noticed that those preceded with a '@' don't show up when browsing the ...
8
votes
2answers
5k 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 ...
3
votes
1answer
1k views

How to 'free' a TCP port?

I have some code that listens to a specific TCP port. However, when I stop this code and restart it quickly afterwards, I see the error ERROR: could not bind to socket on 0.0.0.0:7700 If I wait a ...
3
votes
1answer
386 views

Idiomatic location for file based sockets on Debian systems

I am writing a daemon process for a Debian system in C that uses a Unix Domain Socket. If the deamon process's working directory is the root directory, is there an idiomatic directory to place the ...
2
votes
2answers
296 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 ...
3
votes
2answers
2k 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?
0
votes
1answer
3k views

Could not bind socket: Permission denied when trying to start NDOUtils using UNIX socket

I followed these directions to a tee: http://shah-oss.blogspot.com/2010/12/ndoutils-installation-on-centos-for.html Everything was going well until I actually tried to run this command (there is a ...
2
votes
1answer
763 views

Espeak showing some warnings and Input output error

I am running espeak on Linux Mint 14. Whenever I try to run it, it shows following warnings ( Not errors as it works correctly ). ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM ...
9
votes
4answers
5k views

Are FIFO, pipe & Unix domain socket the same thing in Linux kernel?

I heard that FIFOs are named pipes. And they have exactly the same semantics. On the other hand, I think Unix domain socket is quite similar to pipe (although I've never made use of it). So I wonder ...
4
votes
4answers
3k 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
2answers
473 views

Cross-process dup on Linux

I'd like to dup a file descriptor running in an unrelated process on Linux. I know about sendmsg(2) and SCM_RIGHTS (e.g. ...
0
votes
2answers
82 views

Why flipping is done on data from Big endian before storing in LE?

Simple but confusing question for a beginner. Suppose A is a BE machine and is sending 0x44332211 sending data to B which is LE. By default A will be using htonl of 0x44332211 which is nothing but ...
0
votes
1answer
883 views

How to connect to port immedeately, avoiding socket_bind(): unable to bind address?

When running a code that is supposed to read from a TCP/IP port I often get the following message (depending exactly what language have been used): socket_bind(): unable to bind address I know that ...
1
vote
1answer
134 views

Communication to device is lost when network starts on boot up?

I have an application that opens a socket on port 4444 to a device (/dev/linkToDevice). The "linkToDevice" is a link to ttyUSB0. The application is a c++ program of which is now a daemon and runs at ...
2
votes
1answer
76 views

Custom application running on embedded device - do I need to register my listening port in /etc/services?

I have written an application that will run on an embedded device. The installation is very minimal and uses busybox and not many other things. Part of the software includes a listener thread that ...