Add uid,event attrs to `Channel`
parent
acb5dc398e
commit
b908bd0b9d
|
@ -81,6 +81,9 @@ class Channel:
|
||||||
f"A stream was provided with local addr {self.laddr}"
|
f"A stream was provided with local addr {self.laddr}"
|
||||||
)
|
)
|
||||||
self._destaddr = destaddr or self.squeue.raddr
|
self._destaddr = destaddr or self.squeue.raddr
|
||||||
|
# set after handshake - always uid of far end
|
||||||
|
self.uid = None
|
||||||
|
self.event = None
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
if self.squeue:
|
if self.squeue:
|
||||||
|
@ -106,6 +109,7 @@ class Channel:
|
||||||
return stream
|
return stream
|
||||||
|
|
||||||
async def send(self, item):
|
async def send(self, item):
|
||||||
|
log.debug(f"send `{item}`")
|
||||||
await self.squeue.put(item)
|
await self.squeue.put(item)
|
||||||
|
|
||||||
async def recv(self):
|
async def recv(self):
|
||||||
|
@ -180,3 +184,6 @@ class Channel:
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
def connected(self):
|
||||||
|
return self.squeue is not None
|
||||||
|
|
Loading…
Reference in New Issue