Open Lighting Architecture
0.9.5
|
A file descriptor that supports both read & write.
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. |
|
virtual |
Called when there is data available on the descriptor.
This is usually called by the SelectServer.
Implements ola::io::ReadFileDescriptor.
|
virtual |
Called when the descriptor can be written to.
This is usually called by the SelectServer.
Implements ola::io::WriteFileDescriptor.
|
inline |
Set the callback to be run when data is available for reading.
on_read | the callback to run, ownership of the callback is transferred. |
|
inline |
Set the callback to be run when the descriptor can be written to.
on_write | the callback to run, ownership of the callback is transferred. |