code: def stop(self, timeout_s=None):
      
      self._live = False
      try:
        self._sock.shutdown(socket.SHUT_RDWR)
        self._sock.close()
      except socket.error:
        pass
      self.join(timeout_s)
docs: Stop listening for messages.