Files
py-libp2p/libp2p/transport/typing.py
2024-02-19 16:05:58 -07:00

25 lines
501 B
Python

from typing import (
Awaitable,
Callable,
Mapping,
Type,
)
from libp2p.io.abc import (
ReadWriteCloser,
)
from libp2p.security.secure_transport_interface import (
ISecureTransport,
)
from libp2p.stream_muxer.abc import (
IMuxedConn,
)
from libp2p.typing import (
TProtocol,
)
THandler = Callable[[ReadWriteCloser], Awaitable[None]]
TSecurityOptions = Mapping[TProtocol, ISecureTransport]
TMuxerClass = Type[IMuxedConn]
TMuxerOptions = Mapping[TProtocol, TMuxerClass]