38#ifndef BLOCXX_UNNAMEDPIPE_HPP_
39#define BLOCXX_UNNAMEDPIPE_HPP_
40#include "blocxx/BLOCXX_config.h"
73 int writeInt(
int value);
84 int writeString(
const String& strData);
94 int readInt(
int* value);
107 int readString(
String& strData);
109 static const int INFINITE_TIMEOUT = -1;
118 BLOCXX_DEPRECATED
void setReadTimeout(
int seconds) { m_readTimeout = Timeout::relative(seconds); }
135 BLOCXX_DEPRECATED
void setWriteTimeout(
int seconds) { m_writeTimeout = Timeout::relative(seconds); }
152 BLOCXX_DEPRECATED
void setTimeouts(
int seconds) { m_readTimeout = m_writeTimeout = Timeout::relative(seconds); }
332 : m_readTimeout(
Timeout::infinite)
333 , m_writeTimeout(
Timeout::infinite)
#define BLOCXX_DECLARE_APIEXCEPTION(NAME, LINKAGE_SPEC)
Declare a new exception class named <NAME>Exception that derives from Exception This macro is typical...
PURPOSE: The AutoResource class template is an analog of std::auto_ptr for managing arbitrary resourc...
This String class is an abstract data type that represents as NULL terminated string of characters.
A timeout can be absolute, which means that it will happen at the specified DateTime.
Abstract interface for an UnnamedPipe.
virtual Select_t getWriteSelectObj() const =0
Get the write select object.
virtual void setBlocking(EBlockingMode isBlocking=E_BLOCKING)=0
Set the pipe's blocking mode.
BLOCXX_DEPRECATED void setWriteTimeout(int seconds)
virtual EBlockingMode getReadBlocking() const =0
Get the current blocking mode for reading from pipe.
virtual int closeInputHandle()=0
void setTimeouts(const Timeout &timeout)
Sets the read & write timeout values.
virtual Descriptor getInputDescriptor() const =0
Get the underlying input descriptor.
virtual void setReadBlocking(EBlockingMode isBlocking=E_BLOCKING)=0
Set blocking mode for reading from pipe.
void setReadTimeout(const Timeout &timeout)
Sets the read timeout value.
Timeout getReadTimeout()
Gets the read timeout value.
virtual void open()=0
Open the pipe.
void setWriteTimeout(const Timeout &timeout)
Sets the write timeout value.
virtual void passDescriptor(Descriptor h, const UnnamedPipeRef &ackPipe=0, const ProcessRef &targetProcess=0)=0
Sends a Descriptor to the peer.
virtual bool isOpen() const =0
Is the pipe open or closed?
virtual int close()=0
Close the pipe.
virtual EBlockingMode getWriteBlocking() const =0
Get the current blocking mode for writing from pipe.
virtual void setWriteBlocking(EBlockingMode isBlocking=E_BLOCKING)=0
Set blocking mode for writing to pipe.
BLOCXX_DEPRECATED void setReadTimeout(int seconds)
BLOCXX_DEPRECATED void setTimeouts(int seconds)
virtual Descriptor getOutputDescriptor() const =0
Get the underlying output descriptor.
Timeout getWriteTimeout()
Gets the write timeout value.
virtual AutoDescriptor receiveDescriptor(const UnnamedPipeRef &ackPipe=0)=0
Gets a Descriptor from the peer.
virtual int closeOutputHandle()=0
virtual Select_t getReadSelectObj() const =0
Get the read select object.
BLOCXX_EXPORT_TEMPLATE(BLOCXX_COMMON_API, Array, Bool)