Ejemplo n.º 1
0
 def listening(self):
     # TODO: must be disconnected?
     with self._connlock:
         if self._listening is None:
             return False
         return _util.is_locked(self._listening)
Ejemplo n.º 2
0
 def connected(self):  # may send responses/events
     with self._connlock:
         return _util.is_locked(self._connected)