py-libp2p/connection/raw_connection.py
2018-10-31 22:39:47 +01:00

11 lines
290 B
Python

from .raw_connection import IRawConnection
class RawConnection(IRawConnection):
def __init__(self, ip, port):
self.ip = ip
self.port = port
async def open_connection(self):
self.reader, self.writer = await asyncio.open_connection(self.ip, self.port)