code: def run(self):
          
          # self.log("ready to receive.")
          # we use a runloop instead of synchronous recv so stopping the node mid-recv is possible
          read_ready = None
  
          while self.keep_listening:
              try:
                  read_ready, w, x = select.select([self.recv_socket], [], [], 0.01)
              except Exception:
                  # catch timeouts
                  pass
  
              if read_ready:
                  packet, addr = read_ready[0].recvfrom(4096)
                  if addr[1] == self.port:
                      # for each address listening to this link
                      for mac_addr, recv_queue in self.inq.items():
                          recv_queue.put(packet)  # put packet in node's recv queue
                  else:
                      pass
docs: runloop that reads incoming packets off the interface into the inq buffer