2019-09-12 00:38:12 +08:00
|
|
|
from abc import abstractmethod
|
|
|
|
from typing import Tuple
|
|
|
|
|
|
|
|
from libp2p.io.abc import Closer
|
|
|
|
from libp2p.network.stream.net_stream_interface import INetStream
|
|
|
|
from libp2p.stream_muxer.abc import IMuxedConn
|
|
|
|
|
|
|
|
|
|
|
|
class INetConn(Closer):
|
2019-09-23 15:46:50 +08:00
|
|
|
muxed_conn: IMuxedConn
|
2019-09-12 00:38:12 +08:00
|
|
|
|
|
|
|
@abstractmethod
|
|
|
|
async def new_stream(self) -> INetStream:
|
|
|
|
...
|
|
|
|
|
|
|
|
@abstractmethod
|
|
|
|
async def get_streams(self) -> Tuple[INetStream, ...]:
|
|
|
|
...
|