Skip to content

Class swarmauri_core.transports.i_unicast.IUnicastTransport

swarmauri_core.transports.i_unicast.IUnicastTransport

Bases: ABC

Interface for transports that support point-to-point messaging.

send abstractmethod async

send(target, data, *, timeout=None)

Send data to a single target address.

Source code in swarmauri_core/transports/i_unicast.py
12
13
14
15
16
@abstractmethod
async def send(
    self, target: str, data: bytes, *, timeout: Optional[float] = None
) -> None:
    """Send data to a single target address."""

recv abstractmethod async

recv(*, timeout=None)

Receive data from the transport.

Source code in swarmauri_core/transports/i_unicast.py
18
19
20
@abstractmethod
async def recv(self, *, timeout: Optional[float] = None) -> bytes:
    """Receive data from the transport."""