Open Lighting Architecture  0.9.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
ola::io::UnmanagedFileDescriptor Class Reference

Detailed Description

Allows a FD created by a library to be used with the SelectServer.

Inheritance diagram for ola::io::UnmanagedFileDescriptor:
ola::io::BidirectionalFileDescriptor ola::io::ReadFileDescriptor ola::io::WriteFileDescriptor

Public Member Functions

 UnmanagedFileDescriptor (int fd)
 Create a new UnmanagedFileDescriptor.
DescriptorHandle ReadDescriptor () const
 Returns the read descriptor for this socket.
DescriptorHandle WriteDescriptor () const
 Returns the write descriptor for this socket.
- Public Member Functions inherited from ola::io::BidirectionalFileDescriptor
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
bool ValidReadDescriptor () const
 Check if this file descriptor is valid.
- Public Member Functions inherited from ola::io::WriteFileDescriptor
bool ValidWriteDescriptor () const
 Check if this file descriptor is valid.

Protected Attributes

DescriptorHandle m_handle

Constructor & Destructor Documentation

ola::io::UnmanagedFileDescriptor::UnmanagedFileDescriptor ( int  fd)
explicit

Create a new UnmanagedFileDescriptor.

Parameters
fdthe file descriptor to use

Member Function Documentation

DescriptorHandle ola::io::UnmanagedFileDescriptor::ReadDescriptor ( ) const
inlinevirtual

Returns the read descriptor for this socket.

Returns
the DescriptorHandle for this descriptor.

Implements ola::io::ReadFileDescriptor.

DescriptorHandle ola::io::UnmanagedFileDescriptor::WriteDescriptor ( ) const
inlinevirtual

Returns the write descriptor for this socket.

Returns
the DescriptorHandle for this descriptor.

Implements ola::io::WriteFileDescriptor.


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