38#ifndef BLOCXX_UNNAMEDPIPE_HPP_
39#define BLOCXX_UNNAMEDPIPE_HPP_
40#include "blocxx/BLOCXX_config.h"
#define BLOCXX_DECLARE_APIEXCEPTION(NAME, LINKAGE_SPEC)
Declare a new exception class named <NAME>Exception that derives from Exception This macro is typical...
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.
static Timeout relative(float seconds)
Abstract interface for an UnnamedPipe.
int readString(String &strData)
Reads a String from the pipe.
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.
static const int INFINITE_TIMEOUT
Timeout getReadTimeout()
Gets the read timeout value.
virtual void open()=0
Open the pipe.
int readInt(int *value)
Reads an int (native binary representation) from 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?
int writeString(const String &strData)
Writes a String to the pipe.
virtual int close()=0
Close the pipe.
int writeInt(int value)
Write an int (native binary representation) to 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.
IntrusiveReference< UnnamedPipe > UnnamedPipeRef
IntrusiveReference< Process > ProcessRef
AutoResource< AutoDescriptorPolicy > AutoDescriptor
An analog of std::auto_ptr for descriptors.
BLOCXX_EXPORT_TEMPLATE(BLOCXX_COMMON_API, Array, Bool)