#include <PosixUnnamedPipe.hpp>

Public Member Functions | |
| PosixUnnamedPipe (EOpen doOpen=E_OPEN) | |
| virtual | ~PosixUnnamedPipe () |
| virtual int | write (const void *data, int dataLen, bool errorAsException=false) |
| Write a specified number of bytes to the device that is exposing the IOIFC interface. | |
| virtual int | read (void *buffer, int bufferLen, bool errorAsException=false) |
| Read a specified number of bytes from the device that is exposing the IOIFC interface. | |
| int | getInputHandle () |
| int | getOutputHandle () |
| virtual void | open () |
| Open the pipe. | |
| virtual int | close () |
| Close the pipe. | |
| virtual bool | isOpen () const |
| Is the pipe open or closed? | |
| int | closeInputHandle () |
| int | closeOutputHandle () |
| virtual void | setBlocking (EBlockingMode outputIsBlocking=E_BLOCKING) |
| Set the pipe's blocking mode. | |
| virtual Select_t | getSelectObj () const |
| virtual Select_t | getWriteSelectObj () const |
| Get a write select object. | |
Private Attributes | |
| int | m_fds [2] |
| EBlockingMode | m_blocking |
Definition at line 49 of file PosixUnnamedPipe.hpp.
| BLOCXX_NAMESPACE::PosixUnnamedPipe::PosixUnnamedPipe | ( | EOpen | doOpen = E_OPEN |
) |
Definition at line 212 of file PosixUnnamedPipe.cpp.
References BLOCXX_NAMESPACE::UnnamedPipe::E_BLOCKING, BLOCXX_NAMESPACE::UnnamedPipe::open(), BLOCXX_NAMESPACE::UnnamedPipe::setBlocking(), and BLOCXX_NAMESPACE::UnnamedPipe::setTimeouts().
| BLOCXX_NAMESPACE::PosixUnnamedPipe::~PosixUnnamedPipe | ( | ) | [virtual] |
| int BLOCXX_NAMESPACE::PosixUnnamedPipe::write | ( | const void * | dataOut, | |
| int | dataOutLen, | |||
| bool | errorAsException = false | |||
| ) | [virtual] |
Write a specified number of bytes to the device that is exposing the IOIFC interface.
| dataOut | A pointer to a location in memory that contains the bytes that will be written to the device. | |
| dataOutLen | The length of the data pointed to by the dataOut param. | |
| errorAsException | If true and an error occurs durring the write operation, then throw an exception. |
| An | exception will be thrown upon an error condition if errorAsException is true. |
Implements BLOCXX_NAMESPACE::IOIFC.
Definition at line 426 of file PosixUnnamedPipe.cpp.
References _WRITE, BLOCXX_THROW_ERRNO_MSG, BLOCXX_NAMESPACE::UnnamedPipe::E_BLOCKING, BLOCXX_NAMESPACE::SocketFlags::E_WAIT_FOR_OUTPUT, m_blocking, m_fds, BLOCXX_NAMESPACE::UnnamedPipe::m_writeTimeout, and BLOCXX_NAMESPACE::SocketUtils::waitForIO().
| int BLOCXX_NAMESPACE::PosixUnnamedPipe::read | ( | void * | dataIn, | |
| int | dataInLen, | |||
| bool | errorAsException = false | |||
| ) | [virtual] |
Read a specified number of bytes from the device that is exposing the IOIFC interface.
| dataIn | A pointer to a location in memory to put the bytes that have been read. | |
| dataInLen | The number of bytes being requested from the device. | |
| errorAsException | If true and an error occurs durring the read operation, then throw an exception. |
| An | exception will be thrown upon an error condition if errorAsException is true. |
Implements BLOCXX_NAMESPACE::IOIFC.
Definition at line 481 of file PosixUnnamedPipe.cpp.
References _READ, BLOCXX_THROW_ERRNO_MSG, BLOCXX_NAMESPACE::UnnamedPipe::E_BLOCKING, BLOCXX_NAMESPACE::SocketFlags::E_WAIT_FOR_INPUT, m_blocking, m_fds, BLOCXX_NAMESPACE::UnnamedPipe::m_readTimeout, and BLOCXX_NAMESPACE::SocketUtils::waitForIO().
| int BLOCXX_NAMESPACE::PosixUnnamedPipe::getInputHandle | ( | ) | [inline] |
Definition at line 56 of file PosixUnnamedPipe.hpp.
| int BLOCXX_NAMESPACE::PosixUnnamedPipe::getOutputHandle | ( | ) | [inline] |
Definition at line 57 of file PosixUnnamedPipe.hpp.
| void BLOCXX_NAMESPACE::PosixUnnamedPipe::open | ( | ) | [virtual] |
Open the pipe.
Implements BLOCXX_NAMESPACE::UnnamedPipe.
Definition at line 282 of file PosixUnnamedPipe.cpp.
References BLOCXX_THROW, close(), and m_fds.
| int BLOCXX_NAMESPACE::PosixUnnamedPipe::close | ( | ) | [virtual] |
Close the pipe.
Implements BLOCXX_NAMESPACE::UnnamedPipe.
Definition at line 350 of file PosixUnnamedPipe.cpp.
Referenced by open(), and ~PosixUnnamedPipe().
| bool BLOCXX_NAMESPACE::PosixUnnamedPipe::isOpen | ( | ) | const [virtual] |
Is the pipe open or closed?
Implements BLOCXX_NAMESPACE::UnnamedPipe.
Definition at line 381 of file PosixUnnamedPipe.cpp.
References m_fds.
| int BLOCXX_NAMESPACE::PosixUnnamedPipe::closeInputHandle | ( | ) |
| int BLOCXX_NAMESPACE::PosixUnnamedPipe::closeOutputHandle | ( | ) |
| void BLOCXX_NAMESPACE::PosixUnnamedPipe::setBlocking | ( | EBlockingMode | outputIsBlocking = E_BLOCKING |
) | [virtual] |
Set the pipe's blocking mode.
Precondition: The pipe is open.
| outputIsBlocking | new blocking mode. |
Implements BLOCXX_NAMESPACE::UnnamedPipe.
Definition at line 236 of file PosixUnnamedPipe.cpp.
References BLOCXX_ASSERT, BLOCXX_THROW_ERRNO_MSG, BLOCXX_NAMESPACE::UnnamedPipe::E_BLOCKING, i, m_blocking, and m_fds.
| Select_t BLOCXX_NAMESPACE::PosixUnnamedPipe::getSelectObj | ( | ) | const [virtual] |
Implements BLOCXX_NAMESPACE::SelectableIFC.
Definition at line 536 of file PosixUnnamedPipe.cpp.
References m_fds.
| Select_t BLOCXX_NAMESPACE::PosixUnnamedPipe::getWriteSelectObj | ( | ) | const [virtual] |
Get a write select object.
Implements BLOCXX_NAMESPACE::UnnamedPipe.
Definition at line 553 of file PosixUnnamedPipe.cpp.
References m_fds.
int BLOCXX_NAMESPACE::PosixUnnamedPipe::m_fds[2] [private] |
Definition at line 67 of file PosixUnnamedPipe.hpp.
Referenced by close(), closeInputHandle(), closeOutputHandle(), getSelectObj(), getWriteSelectObj(), isOpen(), open(), read(), setBlocking(), and write().
Definition at line 72 of file PosixUnnamedPipe.hpp.
Referenced by read(), setBlocking(), and write().
1.5.3