LIRC libraries
Linux Infrared Remote Control
Loading...
Searching...
No Matches
lirc.async_client.AsyncConnection Class Reference

Asynchronous read interface on top of an AbstractConnection. More...

Inheritance diagram for lirc.async_client.AsyncConnection:

Public Member Functions

 __init__ (self, AbstractConnection connection, asyncio.AbstractEventLoop loop)
 
 close (self)
 Clean up loop and the base connection.
 
str readline (self)
 
 __aiter__ (self)
 Return async iterator.
 
 __anext__ (self)
 
 __aenter__ (self)
 
 __aexit__ (self, exc_type, exc, traceback)
 

Protected Attributes

 _conn = connection
 
 _loop = loop
 
 _queue = asyncio.Queue()
 

Detailed Description

Asynchronous read interface on top of an AbstractConnection.

Parameters
  • connection: Typically a lirc.RawConnection or lirc.LircdConnection.
  • loop: AbstractEventLoop, typically obtained using asyncio.get_event_loop().

Definition at line 53 of file async_client.py.

Constructor & Destructor Documentation

◆ __init__()

lirc.async_client.AsyncConnection.__init__ ( self,
AbstractConnection connection,
asyncio.AbstractEventLoop loop )

Definition at line 55 of file async_client.py.

Member Function Documentation

◆ __aenter__()

lirc.async_client.AsyncConnection.__aenter__ ( self)
 Implement "async with". 

Definition at line 85 of file async_client.py.

◆ __aexit__()

lirc.async_client.AsyncConnection.__aexit__ ( self,
exc_type,
exc,
traceback )
 Implement exit from "async with". 

Definition at line 89 of file async_client.py.

◆ __aiter__()

lirc.async_client.AsyncConnection.__aiter__ ( self)

Return async iterator.

Definition at line 78 of file async_client.py.

◆ __anext__()

lirc.async_client.AsyncConnection.__anext__ ( self)
 Implement async iterator.next(). 

Definition at line 81 of file async_client.py.

◆ close()

lirc.async_client.AsyncConnection.close ( self)

Clean up loop and the base connection.

Definition at line 70 of file async_client.py.

◆ readline()

str lirc.async_client.AsyncConnection.readline ( self)
 Asynchronous get next line from the connection. 

Definition at line 73 of file async_client.py.

Member Data Documentation

◆ _conn

lirc.async_client.AsyncConnection._conn = connection
protected

Definition at line 64 of file async_client.py.

◆ _loop

lirc.async_client.AsyncConnection._loop = loop
protected

Definition at line 65 of file async_client.py.

◆ _queue

lirc.async_client.AsyncConnection._queue = asyncio.Queue()
protected

Definition at line 66 of file async_client.py.


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