mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-09 14:40:53 +00:00
Refactor mplex and start to add close detection
This commit is contained in:
18
libp2p/network/connection/net_connection_interface.py
Normal file
18
libp2p/network/connection/net_connection_interface.py
Normal file
@ -0,0 +1,18 @@
|
||||
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):
|
||||
conn: IMuxedConn
|
||||
|
||||
@abstractmethod
|
||||
async def new_stream(self) -> INetStream:
|
||||
...
|
||||
|
||||
@abstractmethod
|
||||
async def get_streams(self) -> Tuple[INetStream, ...]:
|
||||
...
|
||||
Reference in New Issue
Block a user