Sockets, Unix Domain UDP C++ recvfrom fail to populate the source address Sockets, Unix Domain UDP C++ recvfrom fail to populate the source address unix unix

Sockets, Unix Domain UDP C++ recvfrom fail to populate the source address


You are setting the address size argument to size of Internet address sockaddr_in, which is too small for Unix path.

Edit 0:

I believe the problem is that you are not bind(2)-ing the client socket, so it does not have a name, thus recvfrom(2) returns zero for address length.

Try code from here (the client needs a name different from the server name).