py-libp2p/connection/raw_connection.py

11 lines
290 B
Python
Raw Normal View History

2018-11-01 05:39:47 +08:00
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)