mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Refactor mplex and start to add close detection
This commit is contained in:
@ -3,9 +3,9 @@ from typing import TYPE_CHECKING, Dict, Sequence
|
||||
|
||||
from multiaddr import Multiaddr
|
||||
|
||||
from libp2p.network.connection.net_connection_interface import INetConn
|
||||
from libp2p.peer.id import ID
|
||||
from libp2p.peer.peerstore_interface import IPeerStore
|
||||
from libp2p.stream_muxer.abc import IMuxedConn
|
||||
from libp2p.transport.listener_interface import IListener
|
||||
from libp2p.typing import StreamHandlerFn, TProtocol
|
||||
|
||||
@ -18,7 +18,7 @@ if TYPE_CHECKING:
|
||||
class INetwork(ABC):
|
||||
|
||||
peerstore: IPeerStore
|
||||
connections: Dict[ID, IMuxedConn]
|
||||
connections: Dict[ID, INetConn]
|
||||
listeners: Dict[str, IListener]
|
||||
|
||||
@abstractmethod
|
||||
@ -28,7 +28,7 @@ class INetwork(ABC):
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
async def dial_peer(self, peer_id: ID) -> IMuxedConn:
|
||||
async def dial_peer(self, peer_id: ID) -> INetConn:
|
||||
"""
|
||||
dial_peer try to create a connection to peer_id
|
||||
|
||||
|
||||
Reference in New Issue
Block a user