diff --git a/libp2p/network/stream/net_stream.py b/libp2p/network/stream/net_stream.py index 010bd922..ff78f5a8 100644 --- a/libp2p/network/stream/net_stream.py +++ b/libp2p/network/stream/net_stream.py @@ -7,6 +7,7 @@ from .net_stream_interface import INetStream class NetStream(INetStream): muxed_stream: IMuxedStream + # TODO: Why we expose `mplex_conn` here? mplex_conn: IMuxedConn protocol_id: TProtocol diff --git a/libp2p/typing.py b/libp2p/typing.py index f36d8ab7..ba776e19 100644 --- a/libp2p/typing.py +++ b/libp2p/typing.py @@ -9,5 +9,4 @@ if TYPE_CHECKING: TProtocol = NewType("TProtocol", str) StreamHandlerFn = Callable[["INetStream"], Awaitable[None]] - -StreamReader = Union["IMuxedStream", IRawConnection] +StreamReader = Union["IMuxedStream", "INetStream", IRawConnection]