Open Lighting Architecture  Latest Git
Public Member Functions | List of all members
ola::io::BidirectionalFileDescriptor Class Reference

Detailed Description

A file descriptor that supports both read & write.

Inheritance diagram for ola::io::BidirectionalFileDescriptor:
Inheritance graph
[legend]
Collaboration diagram for ola::io::BidirectionalFileDescriptor:
Collaboration graph
[legend]

Public Member Functions

void SetOnData (ola::Callback0< void > *on_read)
 Set the callback to be run when data is available for reading. More...
 
void SetOnWritable (ola::Callback0< void > *on_write)
 Set the callback to be run when the descriptor can be written to. More...
 
void PerformRead ()
 Called when there is data available on the descriptor. More...
 
void PerformWrite ()
 Called when the descriptor can be written to. More...
 
- Public Member Functions inherited from ola::io::ReadFileDescriptor
virtual DescriptorHandle ReadDescriptor () const =0
 Returns the read descriptor for this socket. More...
 
bool ValidReadDescriptor () const
 Check if this file descriptor is valid. More...
 
- Public Member Functions inherited from ola::io::WriteFileDescriptor
virtual DescriptorHandle WriteDescriptor () const =0
 Returns the write descriptor for this socket. More...
 
bool ValidWriteDescriptor () const
 Check if this file descriptor is valid. More...
 

Member Function Documentation

◆ PerformRead()

void ola::io::BidirectionalFileDescriptor::PerformRead ( )
virtual

Called when there is data available on the descriptor.

This is usually called by the SelectServer.

Implements ola::io::ReadFileDescriptor.

◆ PerformWrite()

void ola::io::BidirectionalFileDescriptor::PerformWrite ( )
virtual

Called when the descriptor can be written to.

This is usually called by the SelectServer.

Implements ola::io::WriteFileDescriptor.

◆ SetOnData()

void ola::io::BidirectionalFileDescriptor::SetOnData ( ola::Callback0< void > *  on_read)
inline

Set the callback to be run when data is available for reading.

Parameters
on_readthe callback to run, ownership of the callback is transferred.

◆ SetOnWritable()

void ola::io::BidirectionalFileDescriptor::SetOnWritable ( ola::Callback0< void > *  on_write)
inline

Set the callback to be run when the descriptor can be written to.

Parameters
on_writethe callback to run, ownership of the callback is transferred.

The documentation for this class was generated from the following files: