py-libp2p/libp2p/network/connection/raw_connection_interface.py
2019-08-02 11:47:08 -07:00

16 lines
284 B
Python

from abc import ABC, abstractmethod
class IRawConnection(ABC):
"""
A Raw Connection provides a Reader and a Writer
"""
@abstractmethod
async def write(self, data: bytes) -> None:
pass
@abstractmethod
async def read(self) -> bytes:
pass