py-libp2p/libp2p/typing.py
2019-08-08 16:09:02 +08:00

7 lines
212 B
Python

from typing import Awaitable, Callable, NewType
from libp2p.network.stream.net_stream_interface import INetStream
TProtocol = NewType("TProtocol", str)
StreamHandlerFn = Callable[[INetStream], Awaitable[None]]