On Fri, 31 Oct 2025, Andrew Cagney wrote:
With SOCK_STREAM, partial reads can always happen. If you want whole-packet reads (< MTU size) you'll have to use SOCK_DGRAM or SOCK_SEQPACKET; or send the message size too, so that the server can loop until it gets the whole packet.yea, might be time to update to SOCK_SEQPACKET
If you want to keep using SOCK_STREAM, then see: sendmsg(2), CMSG_DATA(3) and recvmsg(2) (w/ MSG_WAITALL). -RVP