Sane C++ Libraries
C++ Platform Abstraction Libraries
SC::PipeDescriptor Struct Reference

Descriptor representing a Pipe used for InterProcess Communication (IPC) More...

#include <FileDescriptor.h>

Public Types

enum  InheritableReadFlag {
  ReadInheritable ,
  ReadNonInheritable
}
 Specifies a flag for read side of the pipe. More...
 
enum  InheritableWriteFlag {
  WriteInheritable ,
  WriteNonInheritable
}
 Specifies a flag for write side of the pipe. More...
 

Public Member Functions

Result createPipe (InheritableReadFlag readFlag=ReadNonInheritable, InheritableWriteFlag writeFlag=WriteNonInheritable)
 Creates a Pipe. More...
 
Result close ()
 Closes the pipe. More...
 

Public Attributes

FileDescriptor readPipe
 The read side of the pipe. More...
 
FileDescriptor writePipe
 The write side of the pipe. More...
 

Detailed Description

Descriptor representing a Pipe used for InterProcess Communication (IPC)

Member Enumeration Documentation

◆ InheritableReadFlag

Specifies a flag for read side of the pipe.

Enumerator
ReadInheritable 

Requests read side of the pipe to be inheritable from child processes.

ReadNonInheritable 

Requests read side of the pipe not to be inheritable from child processes.

◆ InheritableWriteFlag

Specifies a flag for write side of the pipe.

Enumerator
WriteInheritable 

Requests write side of the pipe to be inheritable from child processes.

WriteNonInheritable 

Requests write side of the pipe to be inheritable from child processes.

Member Function Documentation

◆ close()

Result SC::PipeDescriptor::close ( )

Closes the pipe.

Returns
Valid Result if pipe destruction succeeded

◆ createPipe()

Result SC::PipeDescriptor::createPipe ( InheritableReadFlag  readFlag = ReadNonInheritable,
InheritableWriteFlag  writeFlag = WriteNonInheritable 
)

Creates a Pipe.

File descriptors are created with blocking mode enabled by default.

Parameters
readFlagSpecifies how the read side should be created
writeFlagSpecifies how the write side should be created
Returns
Valid Result if pipe creation succeeded

Member Data Documentation

◆ readPipe

FileDescriptor SC::PipeDescriptor::readPipe

The read side of the pipe.

◆ writePipe

FileDescriptor SC::PipeDescriptor::writePipe

The write side of the pipe.


The documentation for this struct was generated from the following file: