Starts the listen loop and executes the receieve_datagram method
        whenever a packet is receieved.

        Args:
          None

        Returns:
          None

def listen_loop(self):
        """Starts the listen loop and executes the receieve_datagram method
        whenever a packet is receieved.

        Args:
          None

        Returns:
          None

        """

        while self.listening:
            try:
                data, address = self.sock.recvfrom(self.bufsize)
                self.receive_datagram(data, address)
                if self.stats_enabled:
                    self.stats['bytes_recieved'] += len(data)
            except socket.error as error:
                if error.errno == errno.WSAECONNRESET:
                    logger.info("connection reset")
                else:
                    raise

        logger.info("Shutting down the listener...")