Expose writer

This commit is contained in:
Alex Stokes
2019-08-02 18:36:42 -07:00
parent 20dd7d777a
commit 7942b7eaa7

View File

@ -6,10 +6,13 @@ from libp2p.security.secure_conn_interface import ISecureConn
class InsecureSession(BaseSession): class InsecureSession(BaseSession):
def __init__( @property
self, transport: BaseSecureTransport, conn: IRawConnection, peer_id: ID def writer(self):
) -> None: return self.insecure_conn.writer
super(InsecureSession, self).__init__(transport, conn, peer_id)
@property
def reader(self):
return self.insecure_conn.reader
async def write(self, data: bytes) -> None: async def write(self, data: bytes) -> None:
await self.insecure_conn.write(data) await self.insecure_conn.write(data)