Module livekit.agents.ipc.channel
Functions
async def arecv_message(dplx: utils.aio.duplex_unix._AsyncDuplex, messages: MessagesDict) ‑> Message
async def asend_message(dplx: utils.aio.duplex_unix._AsyncDuplex, msg: Message) ‑> None
def read_bool(b: io.BytesIO) ‑> bool
def read_bytes(b: io.BytesIO) ‑> bytes
def read_double(b: io.BytesIO) ‑> float
def read_float(b: io.BytesIO) ‑> float
def read_int(b: io.BytesIO) ‑> int
def read_long(b: io.BytesIO) ‑> int
def read_string(b: io.BytesIO) ‑> str
def recv_message(dplx: utils.aio.duplex_unix._Duplex, messages: MessagesDict) ‑> Message
def send_message(dplx: utils.aio.duplex_unix._Duplex, msg: Message) ‑> None
def write_bool(b: io.BytesIO, bi: bool) ‑> None
def write_bytes(b: io.BytesIO, buf: bytes) ‑> None
def write_double(b: io.BytesIO, d: float) ‑> None
def write_float(b: io.BytesIO, f: float) ‑> None
def write_int(b: io.BytesIO, i: int) ‑> None
def write_long(b: io.BytesIO, long: int) ‑> None
def write_string(b: io.BytesIO, s: str) ‑> None
Classes
class DataMessage (*args, **kwargs)
-
Base class for protocol classes.
Protocol classes are defined as::
class Proto(Protocol): def meth(self) -> int: ...
Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing).
For example::
class C: def meth(self) -> int: return 0 def func(x: Proto) -> int: return x.meth() func(C()) # Passes static type check
See PEP 544 for details. Protocol classes decorated with @typing.runtime_checkable act as simple-minded runtime protocols that check only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as::
class GenProto[T](Protocol): def meth(self) -> T: ...
Expand source code
@runtime_checkable class DataMessage(Message, Protocol): def write(self, b: io.BytesIO) -> None: ... def read(self, b: io.BytesIO) -> None: ...
Ancestors
- Message
- typing.Protocol
- typing.Generic
Methods
def read(self, b: io.BytesIO) ‑> None
def write(self, b: io.BytesIO) ‑> None
class Message (*args, **kwargs)
-
Base class for protocol classes.
Protocol classes are defined as::
class Proto(Protocol): def meth(self) -> int: ...
Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing).
For example::
class C: def meth(self) -> int: return 0 def func(x: Proto) -> int: return x.meth() func(C()) # Passes static type check
See PEP 544 for details. Protocol classes decorated with @typing.runtime_checkable act as simple-minded runtime protocols that check only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as::
class GenProto[T](Protocol): def meth(self) -> T: ...
Expand source code
class Message(Protocol): MSG_ID: ClassVar[int]
Ancestors
- typing.Protocol
- typing.Generic
Subclasses
Class variables
var MSG_ID : ClassVar[int]