From bed7e240de1b1ca211b465c934384acc514f4976 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 21 Jun 2018 17:09:22 -0400 Subject: [PATCH] Add uid,event attrs to `Channel` --- piker/ipc.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/piker/ipc.py b/piker/ipc.py index ff2d264..8526a88 100644 --- a/piker/ipc.py +++ b/piker/ipc.py @@ -81,6 +81,9 @@ class Channel: f"A stream was provided with local addr {self.laddr}" ) self._destaddr = destaddr or self.squeue.raddr + # set after handshake - always uid of far end + self.uid = None + self.event = None def __repr__(self): if self.squeue: @@ -106,6 +109,7 @@ class Channel: return stream async def send(self, item): + log.debug(f"send `{item}`") await self.squeue.put(item) async def recv(self): @@ -180,3 +184,6 @@ class Channel: continue else: return + + def connected(self): + return self.squeue is not None