This is a channel that operates indirectly through another channel(s).
![]() | Construction |
![]() | Overrides from class PObject |
![]() | Overrides from class PChannel |
![]() | Channel establish functions |
![]() | readChannel Channel for read operations. |
![]() | readAutoDelete Automatically delete read channel on destruction. |
![]() | writeChannel Channel for write operations. |
![]() | writeAutoDelete Automatically delete write channel on destruction. |
![]() | channelPointerMutex Race condition prevention on closing channel |
![]() | OnOpen () This callback is executed when the Open() function is called with open channels. |
Information functions
Reading functions
Writing functions
Miscellaneous functions
Error functions
Run Time Type functions
Comparison functions
I/O functions
This is a channel that operates indirectly through another channel(s). This allows for a protocol to operate through a "channel" mechanism and for its low level byte exchange (Read and Write) to operate via a completely different channel, eg TCP or Serial port etc.
~PIndirectChannel()
This will use the readChannel pointer to actually do the
read. If readChannel is null the this asserts. The GetErrorCode() function should be consulted after Read() returns
FALSE to determine what caused the failure.
This will use the writeChannel pointer to actually do the
write. If writeChannel is null the this asserts. The GetErrorCode() function should be consulted after Write() returns
FALSE to determine what caused the failure.
The behavour here is to pass the shutdown on to its read and write
channels.
The behaviour for this function is to return "this".
The behaviour for this function is to return "this".
virtual BOOL Close()
virtual BOOL IsOpen() const
virtual BOOL Read( void * buf, PINDEX len )
len - Maximum number of bytes to read into the buffer.virtual BOOL Write( const void * buf, PINDEX len )
len - Number of bytes to write.virtual BOOL Shutdown( ShutdownValue option )
virtual PChannel* GetBaseReadChannel() const
virtual PChannel* GetBaseWriteChannel() const
virtual PString GetErrorText( ErrorGroup group = NumErrorGroups ) const
The channel pointed to by channel may be automatically deleted
when the PIndirectChannel is destroyed or a new subchannel opened.
The channels pointed to by readChannel and writeChannel may be
automatically deleted when the PIndirectChannel is destroyed or a
new subchannel opened.
BOOL Open( PChannel * channel, BOOL autoDelete = TRUE )
autoDelete - Automatically delete the channelBOOL Open( PChannel * readChannel, PChannel * writeChannel, BOOL autoDeleteRead = TRUE, BOOL autoDeleteWrite = TRUE )
PChannel* GetReadChannel() const
BOOL SetReadChannel( PChannel * channel, BOOL autoDelete = TRUE )
autoDelete - Automatically delete the channelPChannel* GetWriteChannel() const
BOOL SetWriteChannel( PChannel * channel, BOOL autoDelete = TRUE )
autoDelete - Automatically delete the channel
The default behaviour is to simply return TRUE.
PChannel* readChannel
BOOL readAutoDelete
PChannel* writeChannel
BOOL writeAutoDelete
PReadWriteMutex channelPointerMutex
Alphabetic index HTML hierarchy of classes or Java