LIRC libraries
LinuxInfraredRemoteControl
lirc.client.AbstractConnection Class Reference

Abstract interface for all connections. More...

Inheritance diagram for lirc.client.AbstractConnection:
lirc.client.LircdConnection lirc.client.RawConnection lirc.client.CommandConnection

Public Member Functions

def __enter__ (self)
 
def __exit__ (self, exc_type, exc, traceback)
 
str readline (self, float timeout=None)
 Read a buffered line. More...
 
int fileno (self)
 Return the file nr used for IO, suitable for select() etc.
 
bool has_data (self)
 Return true if next readline(None) won't block .
 
def close (self)
 Close/release all resources.
 

Detailed Description

Abstract interface for all connections.

Definition at line 158 of file client.py.

Member Function Documentation

◆ readline()

str lirc.client.AbstractConnection.readline (   self,
float   timeout = None 
)

Read a buffered line.

Parameters
  • timeout: seconds.
    • If set to 0 immediately return either a line or None.
    • If set to None (default mode) use blocking read.

Returns code string as described in lircd(8) without trailing newline or None.

Raises TimeoutException if timeout > 0 expires.

Reimplemented in lirc.client.LircdConnection, and lirc.client.RawConnection.

Definition at line 179 of file client.py.


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