Skip to content

Class swarmauri_core.transports.i_anycast.IAnycastTransport

swarmauri_core.transports.i_anycast.IAnycastTransport

Bases: ABC

Interface for transports that can deliver to any of multiple candidates.

anycast abstractmethod async

anycast(candidates, data, *, timeout=None)

Send data to one of the candidate addresses and return the chosen target.

Source code in swarmauri_core/transports/i_anycast.py
12
13
14
15
16
@abstractmethod
async def anycast(
    self, candidates: Sequence[str], data: bytes, *, timeout: Optional[float] = None
) -> str:
    """Send data to one of the candidate addresses and return the chosen target."""