Open Lighting Architecture: ola::io::BidirectionalFileDescriptor Class Reference

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
Public Member Functions | List of all members
ola::io::BidirectionalFileDescriptor Class Reference
I/O & Event Management

## Detailed Description

A file descriptor that supports both read & write.

Inheritance diagram for ola::io::BidirectionalFileDescriptor:

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

## 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_read | the 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_write | the callback to run, ownership of the callback is transferred.

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

- include/ola/io/Descriptor.h
- common/io/Descriptor.cpp