mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-11 07:30:55 +00:00
Use ReadWriteCloser for conns and streams
This commit is contained in:
@ -1,6 +1,4 @@
|
||||
from typing import TYPE_CHECKING, Awaitable, Callable, NewType, Union
|
||||
|
||||
from libp2p.network.connection.raw_connection_interface import IRawConnection
|
||||
from typing import TYPE_CHECKING, Awaitable, Callable, NewType
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from libp2p.network.stream.net_stream_interface import INetStream # noqa: F401
|
||||
@ -8,5 +6,3 @@ if TYPE_CHECKING:
|
||||
|
||||
TProtocol = NewType("TProtocol", str)
|
||||
StreamHandlerFn = Callable[["INetStream"], Awaitable[None]]
|
||||
|
||||
StreamReader = Union["IMuxedStream", "INetStream", IRawConnection]
|
||||
|
||||
Reference in New Issue
Block a user