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
14 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
50 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
7 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
24 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
32 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
46 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
2answers
60 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
43 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
28 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
27 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
26 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
32 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
369 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
122 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
495 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
3k 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
228 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 ...
6
votes
3answers
430 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
83 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
90 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
467 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
262 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
192 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
50 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
378 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
107 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
105 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
511 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
7k 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
171 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
4k 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
991 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
327 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
267 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
727 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
4k 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
417 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
79 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
807 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
133 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
74 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 ...
-1
votes
3answers
452 views

telnet implementation using C [closed]

The program in general is I want to implement telnet program. On the client side user send its logging name and password, and if it is correct he starts to send commands to the server On the Server ...
2
votes
1answer
1k views

Why can't I use strace with rsh?

If I run rsh, it works, but prints some strange “Connection refused” messages at the beginning: $ rsh localhost pwd connect to address 127.0.0.1 port 544: Connection refused Trying krb4 rsh... ...
0
votes
2answers
225 views

Physical layer header is not present in the data read from raw sockets?

i have read about RAW sockets that they are UNIX domain sockets and don't generally go over the wire unlike TCP or UDP. They are used for interprocess communication. Also they are used in the ...
5
votes
1answer
299 views

In bash, can I asynchronously open sockets and use them later?

I had no idea that Bash supported so many advanced features! I started working on a simple network program to try and use some of these things I found. My particular program is a basic redis client ...
2
votes
0answers
268 views

Best location and permissions for socket files [duplicate]

I will have a couple of WSGI applications. They will communicate with nginx using sockets. For that purpose I've created the directory /run/wsgi in which I will place all the socket files that are ...
1
vote
1answer
800 views

Default value for SO_RCVTIMEO option on Solaris

Is there any way to find out what is the default value set for option SO_RCVTIMEO on Solaris 10? If there is a way to find out how would one go about changing it? P.S. I am aware of ability of ...