NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: minimum write size of SOCK_STREAM?
On Fri, 31 Oct 2025 at 20:08, RVP <rvp%sdf.org@localhost> wrote:
>
> 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).
I just want the code to work, portably :-)
I've switched to AF_UNIX+SOCK_SEQPACKET, thanks.
Andrew
Home |
Main Index |
Thread Index |
Old Index