Skip to content
Advertisement

Tag: sockets

why my unix domain socket can’t work

there are two simple program to demo the unix domain DGRAM socket. and the following is the result: it seems like nothing wrong here. but, I get nothing from the server. I don’t know why it can’t run as I expect. Answer You should be sending to /var/run/lsvr.sock not to /var/run/lcli.sock. Also you don’t have to bind in client so

Can’t listen on IPv4 and IPv6 together (address already in use)

I don’t think the precise code is important. Instead, I’ll give the strace output: We can see that socket 5 (IPv4) successfully bound to port any:31337, but when I try to bind socket 6 (IPv6), it fails with EADDRINUSE. You can also see that I did set SO_REUSEADDR on both sockets, so I believe this problem should not have happened.

IPv6 multicast interface selection

The setsockopt way to select an interface for the outgoing traffic with IPv4 is IP_MULTICAST_IF, which accepts two arguments. From the ip(4) manual page: Set the local device for a multicast socket. The argument for setsockopt(2) is an ip_mreqn or (since Linux 3.5) ip_mreq structure similar to IP_ADD_MEMBERSHIP, or an in_addr structure. When trying to do the analogous operation with

One way communication over TCP Socket [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 years ago. Improve this question I am trying to send some data to a remote Raspberry Pi over TCP socket from a GUI that I designed with Python. I’ve implemented

Java – AttachNotSupportedException: Unable to open socket file: HotSpot VM not loaded

When attempting to attach an agent jar file onto another process running in java, I have came across the exception: com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded I was running linux, with java Oracle JDK 8_101, however after answering this question I’ve realized the O.S does not matter for the cause of

SIGPIPE in C++ determining which TCP socket is disconnected

I’m using Linux/Ubuntu. I’ve written a pair of classes that implement a TCP server and TCP client, respectively. Part of the code is to have graceful recovery from disconnects. My only problem is with SIGPIPE. I’ve written code to capture the signal, but I’d like it to start the “attempt to reconnect” process on the class instance that hit the

Advertisement