Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

Pipe Class Reference

Inheritance diagram for Pipe:

Stream List of all members.

Public Member Functions

void close ()
void closeRead ()
void closeWrite ()
int create (bool readPipe=true)
long getReadHandle ()
long getWriteHandle ()
void inverted (Pipe &)
 Pipe ()
bool pipeTerminated ()
virtual int read (char *buffer, u_long len, u_long *nbr)
virtual int write (const char *buffer, u_long len, u_long *nbw)

Private Attributes

int handles [2]
bool terminated

Constructor & Destructor Documentation

Pipe::Pipe  ) 
 


Member Function Documentation

void Pipe::close  ) 
 

Close the pipe.

void Pipe::closeRead  ) 
 

Close the read stream of the pipe.

void Pipe::closeWrite  ) 
 

Close the write stream of the pipe.

int Pipe::create bool  readPipe = true  ) 
 

Create the pipe descriptors. Return 0 on success.

Parameters:
readPipe Specify if the current process uses it for read. A false value means the process uses it to write.

long Pipe::getReadHandle  ) 
 

Get the handle to use to read from the pipe.

long Pipe::getWriteHandle  ) 
 

Get the handle used to write to the pipe.

void Pipe::inverted Pipe pipe  ) 
 

Invert the current pipe on another instance of the class. The input will be used as output and viceversa.

Parameters:
pipe The pipe where write.

bool Pipe::pipeTerminated  ) 
 

int Pipe::read char *  buffer,
u_long  len,
u_long *  nbr
[virtual]
 

Read from the pipe.

Parameters:
buffer Where write.
len Buffer size.
nbr Get how many bytes were read.

Reimplemented from Stream.

int Pipe::write const char *  buffer,
u_long  len,
u_long *  nbw
[virtual]
 

Write from the pipe.

Parameters:
buffer What write.
len Buffer size.
nbr Get how many bytes were really written.

Reimplemented from Stream.


Member Data Documentation

int Pipe::handles[2] [private]
 

bool Pipe::terminated [private]
 


Generated on Mon Jun 16 13:47:19 2008 for MyServer by  doxygen 1.3.9.1