Change IMuxedConn to INetConn in Notifee

This commit is contained in:
mhchia
2019-09-15 21:41:29 +08:00
parent 0356380996
commit 5307c0506b
11 changed files with 40 additions and 43 deletions

View File

@ -3,8 +3,8 @@ from typing import TYPE_CHECKING
from multiaddr import Multiaddr
from libp2p.network.connection.net_connection_interface import INetConn
from libp2p.network.stream.net_stream_interface import INetStream
from libp2p.stream_muxer.abc import IMuxedConn
if TYPE_CHECKING:
from .network_interface import INetwork # noqa: F401
@ -26,14 +26,14 @@ class INotifee(ABC):
"""
@abstractmethod
async def connected(self, network: "INetwork", conn: IMuxedConn) -> None:
async def connected(self, network: "INetwork", conn: INetConn) -> None:
"""
:param network: network the connection was opened on
:param conn: connection that was opened
"""
@abstractmethod
async def disconnected(self, network: "INetwork", conn: IMuxedConn) -> None:
async def disconnected(self, network: "INetwork", conn: INetConn) -> None:
"""
:param network: network the connection was closed on
:param conn: connection that was closed