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

learn more… | top users | synonyms

2
votes
1answer
681 views

Closing socket connection on running console application

I am testing a chat bot and want to gracefully handle for times when the chat server isn't running so it can come back up when the service is available again. I have the programming handled. My ...
4
votes
2answers
4k views

File descriptor linked to socket or pipe in proc [duplicate]

Possible Duplicate: /proc/PID/fd/X link number i have a question regarding the file descriptors and their linkage in the proc file system. I've observed that if i list the file descriptors ...
1
vote
1answer
637 views

Netstat shows programs running on different ports then they should

I have some code I'm testing. Program A listens on a predefined socket for program B to connect to and for my testing I'm running 32 instances of the programs A and B. I've written my script to tell ...
0
votes
2answers
647 views

Force getaddrinfo to use IPv4

The man page says: The getaddrinfo(3) function is not limited to creating IPv4 socket address structures; IPv6 socket address structures can be created if IPv6 support is available. These ...
2
votes
1answer
219 views

Why does this simple Perl client not work?

I am fairly new to IPC with sockets and expect this issue is a simple one to resolve. I'm trying to understand why I cannot get this example script from perldoc perlipc to run on my Ubuntu setup: ...
3
votes
1answer
4k views

Kill TIME_WAIT sockets immediately?

Is there anyway to kill those TIME_WAIT sockets immediately ? e.g output of netstat: tcp 0 0 127.0.0.1:8080 127.0.0.1:41500 TIME_WAIT - tcp 0 ...
2
votes
2answers
1k views

Size of data that can be written to / read from sockets

I was wondering if there is an easy way to find the maximum size that is supported by Linux sockets? (Is this configurable? If so where?) For example, most of the socket examples found on the web ...
3
votes
1answer
383 views

User associated with a socket

I use ss -p to see TCP sockets information. But process info are not printed for some sockets. Below: $ ss -p4 State Recv-Q Send-Q Local Address:Port Peer Address:Port ESTAB 0 0 ...
1
vote
1answer
369 views

How to limit all tcp traffic to the network interface the session was initiated on?

I have an embedded linux system with two network interfaces (lan0, wlan0) that are configured to the same subnet. A server on this system accepts tcp connections on both interfaces. How I can assure ...
2
votes
0answers
316 views

Does epoll give available bytes to read or write, and threshold feature?

kqueue gives available bytes to send or receive if file descriptior (such as socket) gets signal. and, kqueue gives threshold feature, for example, it does not signal until sufficient bytes are ...
4
votes
2answers
3k views

Write inside a socket open by another process in Linux

Is it possible on Linux for a process to write inside a socket open by another one? Let's say I open a connection to google.com using netcat: myuser@linux:~$ nc google.com 80 Now I can lookup for ...
10
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 ...
14
votes
1answer
773 views

“ss” command in iproute package; why query slab table for timewait sockets?

Forgive me if this isn't the best forum for this question, but it seems more relevant to the kernel than to the programming itself. I'm writing a script that queries the system for open ports so that ...
16
votes
3answers
16k views

How can I communicate with a Unix domain socket via the shell on Debian Squeeze?

I’m running a Debian Squeeze web server. I’ve installed memcached on it, and configured memcached to listen on a Unix domain socket (at /tmp/memcached.sock), as it only needs to receive messages from ...
1
vote
1answer
162 views

Wrapping socket connections

I'd like to wrap an insecure connection (this one: http://culturedcode.com/things/) with a secure tunnel, a bit like http://en.wikipedia.org/wiki/Stunnel does, just using UNIX tools. What's the best ...
10
votes
5answers
6k views

Under AIX, how can I get the full path of a program bound to a port?

Under Linux I can use netstat -tulpnw and ps, like so: # netstat -tulpnw | grep :53 tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 1482/named udp ...
4
votes
2answers
5k views

rpc.statd running on system not using NFS

I have a Debian machine that gets warnings (via the Tiger automatic auditor) that rcp.statd is listening on such-and-such socket. Googling shows rpc.statd is a daemon used by NFS. As far as I know, ...
6
votes
1answer
2k views

How long is a TCP local socket address that has been bound unavailable after closing?

On Linux (my live servers are on RHEL 5.5 - the LXR links below are to the kernel version in that), man 7 ip says: A TCP local socket address that has been bound is unavailable for some time after ...
15
votes
2answers
2k views

What is a socket?

Could someone explain to me what a socket is? I see it in many acronyms in context of SSL, etc. Also, why is it called a socket? Is it purely because it was what a name they invented? Or was it the ...
21
votes
2answers
4k 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. ...
7
votes
3answers
9k 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 ...
13
votes
2answers
5k 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 ...