def next_event(self) -> Optional[events.QuicEvent]:
        """
        Retrieve the next event from the event buffer.

        Returns `None` if there are no buffered events.
        """
        try:
            return self._events.popleft()
        except IndexError:
            return None

        Retrieve the next event from the event buffer.

        Returns `None` if there are no buffered events.
        
src/aioquic/quic/connection.py