Open Lighting Architecture  Latest Git
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:
Inheritance graph
[legend]
Collaboration diagram for ola::io::UnmanagedFileDescriptor:
Collaboration graph
[legend]

Public Member Functions

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

Protected Attributes

DescriptorHandle m_handle
 

Constructor & Destructor Documentation

◆ UnmanagedFileDescriptor()

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

Create a new UnmanagedFileDescriptor.

Parameters
fdthe file descriptor to use

Member Function Documentation

◆ ReadDescriptor()

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

Returns the read descriptor for this socket.

Returns
the DescriptorHandle for this descriptor.

Implements ola::io::ReadFileDescriptor.

◆ WriteDescriptor()

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: