mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Fix examples and modify new_node
- Fix examples `chat.py` and `echo.py`
- Use trio directly, instead of `trio-asyncio`
- Remove redundant code
- Change entry API `new_node` to `new_host_trio`
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import TYPE_CHECKING, Dict, Sequence
|
||||
|
||||
from async_service import ServiceAPI
|
||||
from multiaddr import Multiaddr
|
||||
|
||||
from libp2p.network.connection.net_connection_interface import INetConn
|
||||
@ -70,3 +71,7 @@ class INetwork(ABC):
|
||||
@abstractmethod
|
||||
async def close_peer(self, peer_id: ID) -> None:
|
||||
pass
|
||||
|
||||
|
||||
class INetworkService(INetwork, ServiceAPI):
|
||||
...
|
||||
|
||||
Reference in New Issue
Block a user