9fans archive / 2006 / 09 / 328 prev next
From: Russ Cox <rsc@swt...>
Subject: Help on /srv, named pipes
Date: Fri, 22 Sep 2006 11:32:05 -0400
> If there are multiple writers, each write is guaranteed to
> be available in a contiguous piece at the other end of the
> pipe. If there are multiple readers, each read will return
> data from only one write.
This says that if reading from a pipe preserves the
message sizes written to the pipe, and that each read
gets an entire message (when possible) but not
a message and a half.
Pipes do not deliver writes to all readers.
(Nor do network connections, nor Unix pipes.)
If you want to do that you need an arbitrarily
large buffer to accomodate slow readers.
Something like... a file in /tmp.
Russ