I am sending N bytes from a unix domain socket (AF_UNIX, SOCK_DGRAM) to another. However, if I read X bytes from the other socket, where X < N, a subsequent call to read() blocks and I cannot get the rest of the N-X bytes.
Is this an expected behaviour for unix domain sockets? Is the rest of the N-X bytes thrown by the kernel. Is there a solution, such as a socket option?