Open Lighting Architecture  0.9.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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.
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

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.

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.

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.
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: