mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-11 07:30:55 +00:00
add NegotiableTransport type
This commit is contained in:
committed by
Kevin Mai-Husan Chia
parent
9851ee01fb
commit
dbb702548f
@ -1,6 +1,11 @@
|
||||
from typing import Awaitable, Callable, NewType
|
||||
from typing import Awaitable, Callable, NewType, Union
|
||||
|
||||
from libp2p.network.connection.raw_connection_interface import IRawConnection
|
||||
from libp2p.network.stream.net_stream_interface import INetStream
|
||||
from libp2p.stream_muxer.abc import IMuxedStream
|
||||
|
||||
TProtocol = NewType("TProtocol", str)
|
||||
StreamHandlerFn = Callable[[INetStream], Awaitable[None]]
|
||||
|
||||
|
||||
NegotiableTransport = Union[IMuxedStream, IRawConnection]
|
||||
|
||||
Reference in New Issue
Block a user