#include <OW_UnnamedPipe.hpp>
Inheritance diagram for OW_NAMESPACE::UnnamedPipe:
Public Types | |
enum | EBlockingMode { E_NONBLOCKING, E_BLOCKING } |
enum | EOpen { E_DONT_OPEN, E_OPEN } |
Public Member Functions | |
virtual | ~UnnamedPipe () |
int | writeInt (int value) |
Write an int (native binary representation) to the pipe. | |
int | writeString (const String &strData) |
Writes a String to the pipe. | |
int | readInt (int *value) |
Reads an int (native binary representation) from the pipe. | |
int | readString (String &strData) |
Reads a String from the pipe. | |
void | setReadTimeout (int seconds) |
Sets the read timeout value. | |
int | getReadTimeout () |
Gets the read timeout value. | |
void | setWriteTimeout (int seconds) |
Sets the write timeout value. | |
int | getWriteTimeout () |
Gets the write timeout value. | |
void | setTimeouts (int seconds) |
Sets the read & write timeout values. | |
String | readAll () |
Read from the pipe and collect into a string, until the other end of the pipe is closed. | |
virtual void | open ()=0 |
Open the pipe. | |
virtual int | close ()=0 |
Close the pipe. | |
virtual bool | isOpen () const =0 |
Is the pipe open or closed? | |
virtual Select_t | getWriteSelectObj () const =0 |
Get a write select object. | |
virtual void | setBlocking (EBlockingMode outputIsBlocking=E_BLOCKING)=0 |
Set the pipe's blocking mode. | |
virtual void | setOutputBlocking (bool outputIsBlocking=true)=0 |
Static Public Member Functions | |
static UnnamedPipeRef | createUnnamedPipe (EOpen doOpen=E_OPEN) |
Create an instance of the concrete class that implements the UnnamedPipe interface. | |
Protected Member Functions | |
UnnamedPipe () | |
Protected Attributes | |
int | m_readTimeout |
int | m_writeTimeout |
Blocking is enabled by default.
Definition at line 54 of file OW_UnnamedPipe.hpp.
|
Definition at line 171 of file OW_UnnamedPipe.hpp. |
|
Definition at line 185 of file OW_UnnamedPipe.hpp. |
|
Definition at line 49 of file OW_UnnamedPipe.cpp. |
|
Definition at line 198 of file OW_UnnamedPipe.hpp. |
|
Close the pipe.
Implemented in OW_NAMESPACE::PosixUnnamedPipe. |
|
Create an instance of the concrete class that implements the UnnamedPipe interface.
Definition at line 206 of file OW_PosixUnnamedPipe.cpp. Referenced by OW_NAMESPACE::Socket::createShutDownMechanism(). |
|
Gets the read timeout value. If blocking is enabled this is the number of seconds a read operation will block. Exception safety: No-throw
Definition at line 116 of file OW_UnnamedPipe.hpp. |
|
Get a write select object.
Implemented in OW_NAMESPACE::PosixUnnamedPipe. |
|
Gets the write timeout value. If blocking is enabled this is the number of seconds a write operation will block. Exception safety: No-throw
Definition at line 130 of file OW_UnnamedPipe.hpp. |
|
Is the pipe open or closed?
Implemented in OW_NAMESPACE::PosixUnnamedPipe. |
|
Open the pipe.
Implemented in OW_NAMESPACE::PosixUnnamedPipe. |
|
Read from the pipe and collect into a string, until the other end of the pipe is closed. Exception safety: Strong for the C++ instance. Fubared for the pipe. If an exception is thrown, the pipe won't be reset to it's pre-call state.
Definition at line 97 of file OW_UnnamedPipe.cpp. References OW_NAMESPACE::IOIFC::read(), and OW_NAMESPACE::StringBuffer::releaseString(). |
|
Reads an int (native binary representation) from the pipe. If blocking is enabled, readInt() will block for up to getReadTimeout() seconds or forever if getReadTimeout() == -1. Exception safety: No-throw
Definition at line 72 of file OW_UnnamedPipe.cpp. References OW_NAMESPACE::IOIFC::read(). |
|
Reads a String from the pipe. If blocking is enabled, readInt() will block for up to getReadTimeout() seconds or forever if getReadTimeout() == -1. Exception safety: Strong for the C++ instance. Fubared for the pipe. If an exception is thrown, the pipe won't be reset to it's pre-call state.
Definition at line 78 of file OW_UnnamedPipe.cpp. References OW_NAMESPACE::String::E_TAKE_OWNERSHIP, OW_NAMESPACE::AutoPtrVec< X >::get(), and OW_NAMESPACE::AutoPtrVec< X >::release(). |
|
Set the pipe's blocking mode. Precondition: The pipe is open.
|
|
Implemented in OW_NAMESPACE::PosixUnnamedPipe. |
|
Sets the read timeout value. If blocking is enabled this is the number of seconds a read operation will block. Exception safety: No-throw
Definition at line 109 of file OW_UnnamedPipe.hpp. |
|
Sets the read & write timeout values. If blocking is enabled this is the number of seconds a read or write operation will block. Exception safety: No-throw
Definition at line 137 of file OW_UnnamedPipe.hpp. |
|
Sets the write timeout value. If blocking is enabled this is the number of seconds a write operation will block. Exception safety: No-throw
Definition at line 123 of file OW_UnnamedPipe.hpp. |
|
Write an int (native binary representation) to the pipe. If blocking is enabled, writeInt() will block for up to getWriteTimeout() seconds or forever if getWriteTimeout() == -1. Exception safety: No-throw
Definition at line 54 of file OW_UnnamedPipe.cpp. References OW_NAMESPACE::IOIFC::write(). |
|
Writes a String to the pipe. This should be read from the other side by readString. If blocking is enabled, writeString() will block for up to getWriteTimeout() seconds or forever if getWriteTimeout() == -1. Exception safety: No-throw
Definition at line 60 of file OW_UnnamedPipe.cpp. References OW_NAMESPACE::String::c_str(), OW_NAMESPACE::String::length(), and OW_NAMESPACE::IOIFC::write(). |
|
Definition at line 201 of file OW_UnnamedPipe.hpp. Referenced by OW_NAMESPACE::PosixUnnamedPipe::read(). |
|
Definition at line 202 of file OW_UnnamedPipe.hpp. Referenced by OW_NAMESPACE::PosixUnnamedPipe::write(). |