|
Public Member Functions |
| bool | operator! () |
| | Used to see if the pipe has any open entities.
|
| int | receive (void *addr) |
| | Perform an object atomic transfer of data from a pipe.
|
| int | send (void *addr) |
| | Perform an object atomic transfer of data to a pipe.
|
| bool | isValid (void) |
| | Verify this object is "valid".
|
Protected Member Functions |
| int | getSize (void) |
| | Get the object size for atomic operations.
|
| void | endSender (void) |
| | Sender is often used for implementing a fork()'d message port between processes.
|
| void | endReceiver (void) |
| | Receiver is often used for implementing a fork()'d message port between processes.
|
| | Pipe (int size=512, int count=1) |
| | Create a kernel pipe descriptor set using pipe().
|
| virtual | ~Pipe () |
| | Destroy the pipe and kernel descriptor resources.
|
| | Pipe (const Pipe &orig) |
| | Create a pipe as a duplicate of an existing pipe.
|
| Pipe & | operator= (const Pipe &orig) |
| void | sender (void) |
| void | receiver (void) |
| int | read (void *buf, int len) |
| int | write (void *buf, int len) |
Protected Attributes |
| int | fd [2] |
| int | objcount |
| int | objsize |
Unlike thread's "Buffer", Pipe uses system descriptors and kernel memory. Under Posix, the size of the pipe and associated kernel memory is always a fixed constant as defined by _PC_PIPE_BUF. The Common C++ "pipe" class primarily deals with "atomic" transfers of fixed sized objects through pipes. Pipes may pass data arbitrarily and can also be used through the "pipestream" class.
The "Pipe" class is not meant to be a true "public" class, but as a builder class for deriving other classes.