BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdls_pipeutil

Detailed Description

Outline

Purpose

Provide basic portable named-pipe utilities.

Classes

See also
balb_pipecontrolchannel

Description

This component, bdls::PipeUtil, provides portable utility methods for named pipes.

Pipe Atomicity

Applications that expect multiple writers to a single pipe must should be aware that message content might be corrupted (interleaved) unless:

  1. Each message is written to the pipe in a single write system call.
  2. The length of each message is less than PIPE_BUF (the limit for guaranteed atomicity).

The value PIPE_BUF depends on the platform:

+------------------------------+------------------+
| Platform | PIPE_BUF (bytes) |
+------------------------------+------------------+
| POSIX (minimum requirement)) | 512 |
| IBM | 32,768 |
| SUN | 32,768 |
| Linux | 65,536 |
| Windows | 65,536 |
+------------------------------+------------------+

Also note that Linux allows the PIPE_BUF size to be changed via the fcntl system call.