lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 18 Sep 2008 20:31:00 +0300
From:	Rémi Denis-Courmont <>
To:	Hirokazu Takahashi <>,
Subject: Re: [PATCH] sendfile() and UDP socket

Le mardi 16 septembre 2008 15:01:17 Hirokazu Takahashi, vous avez écrit :
> UDP is a datagram protocol, so I think applications using UDP should
> care about the size of packets they are going to send rather than
> expecting that the messages will be split into several packets
> automatically. If some of the packets have lost, it will be really hard for
> the applications to re-create the same ones to send again.

Also, why use UDP for this... If you want stream semantics, why not use TCP or 
SCTP instead?

> If you want send a large file over UDP, the typical code will be like:

> while (...) {
>         sendmsg(fd, &apl_header, sizeof(apl_header), MSG_MORE);
>         offset += sendfile(fd, offset, count);
> }

Correct me if I am wrong, but... Unless you have a big MTU (as _not_ in 1500 
bytes :D), doing an extra syscall might be slower than copying data in a 
single vectorized sendmsg() syscall.

Rémi Denis-Courmont
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists