mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
feat(host): add get_live_peers() to track connection state
This commit is contained in:
committed by
Paul Robinson
parent
f6279c23ac
commit
b2a6294cfa
@ -1143,6 +1143,12 @@ class IHost(ABC):
|
||||
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
def get_live_peers(self) -> list[ID]:
|
||||
"""
|
||||
:return: List of peer IDs that have active connections
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
def run(self, listen_addrs: Sequence[Multiaddr]) -> AsyncContextManager[None]:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user