Move base implementations into BaseSession

This commit is contained in:
Alex Stokes
2019-08-13 15:19:22 -07:00
parent cda74dd382
commit e7d2681fc0
2 changed files with 21 additions and 16 deletions

View File

@ -6,19 +6,7 @@ from libp2p.security.secure_conn_interface import ISecureConn
class InsecureSession(BaseSession):
@property
def writer(self):
return self.insecure_conn.writer
@property
def reader(self):
return self.insecure_conn.reader
async def write(self, data: bytes) -> None:
await self.insecure_conn.write(data)
async def read(self) -> bytes:
return await self.insecure_conn.read()
pass
class InsecureTransport(BaseSecureTransport):