mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
29 lines
475 B
Python
29 lines
475 B
Python
from abc import (
|
|
abstractmethod,
|
|
)
|
|
|
|
import trio
|
|
|
|
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):
|
|
muxed_conn: IMuxedConn
|
|
event_started: trio.Event
|
|
|
|
@abstractmethod
|
|
async def new_stream(self) -> INetStream:
|
|
...
|
|
|
|
@abstractmethod
|
|
def get_streams(self) -> tuple[INetStream, ...]:
|
|
...
|