This commit is contained in:
zixuanzh
2018-11-12 13:02:49 -05:00
parent b4272918d9
commit c5c9d3e5c9
17 changed files with 66 additions and 84 deletions

View File

@ -1,6 +1,6 @@
import asyncio
from .raw_connection_interface import IRawConnection
class RawConnection(IRawConnection):
def __init__(self, ip, port, reader, writer):
@ -12,15 +12,3 @@ class RawConnection(IRawConnection):
def close(self):
self.writer.close()
# def __init__(self, ip, port):
# self.conn_ip = ip
# self.conn_port = port
# self.reader, self.writer = self.open_connection()
# async def open_connection(self):
# """
# opens a connection on self.ip and self.port
# :return: a raw connection
# """
# return await asyncio.open_connection(self.conn_ip, self.conn_port)

View File

@ -1,15 +1,7 @@
from abc import ABC, abstractmethod
from abc import ABC
class IRawConnection(ABC):
"""
A Raw Connection provides a Reader and a Writer
open_connection should return such a connection
"""
# @abstractmethod
# async def open_connection(self):
# """
# opens a connection on ip and port
# :return: a raw connection
# """
# pass