#include "quiche/quic/core/io/quic_poll_event_loop.h"
#include <algorithm>
#include <cerrno>
#include <cmath>
#include <memory>
#include <utility>
#include <vector>
#include "absl/types/span.h"
#include "quiche/quic/core/io/quic_event_loop.h"
#include "quiche/quic/core/quic_alarm.h"
#include "quiche/quic/core/quic_time.h"
#include "quiche/quic/platform/api/quic_bug_tracker.h"
namespace quic {
namespace {
PollMask;
PollMask GetPollMask(QuicSocketEventMask event_mask) { … }
QuicSocketEventMask GetEventMask(PollMask poll_mask) { … }
}
QuicPollEventLoop::QuicPollEventLoop(QuicClock* clock) : … { … }
bool QuicPollEventLoop::RegisterSocket(SocketFd fd, QuicSocketEventMask events,
QuicSocketEventListener* listener) { … }
bool QuicPollEventLoop::UnregisterSocket(SocketFd fd) { … }
bool QuicPollEventLoop::RearmSocket(SocketFd fd, QuicSocketEventMask events) { … }
bool QuicPollEventLoop::ArtificiallyNotifyEvent(SocketFd fd,
QuicSocketEventMask events) { … }
void QuicPollEventLoop::RunEventLoopOnce(QuicTime::Delta default_timeout) { … }
QuicTime::Delta QuicPollEventLoop::ComputePollTimeout(
QuicTime now, QuicTime::Delta default_timeout) const { … }
int QuicPollEventLoop::PollWithRetries(absl::Span<pollfd> fds,
QuicTime start_time,
QuicTime::Delta timeout) { … }
void QuicPollEventLoop::ProcessIoEvents(QuicTime start_time,
QuicTime::Delta timeout) { … }
void QuicPollEventLoop::DispatchIoEvent(std::vector<ReadyListEntry>& ready_list,
SocketFd fd, PollMask mask) { … }
void QuicPollEventLoop::RunReadyCallbacks(
std::vector<ReadyListEntry>& ready_list) { … }
void QuicPollEventLoop::ProcessAlarmsUpTo(QuicTime time) { … }
QuicAlarm* QuicPollEventLoop::AlarmFactory::CreateAlarm(
QuicAlarm::Delegate* delegate) { … }
QuicArenaScopedPtr<QuicAlarm> QuicPollEventLoop::AlarmFactory::CreateAlarm(
QuicArenaScopedPtr<QuicAlarm::Delegate> delegate,
QuicConnectionArena* arena) { … }
QuicPollEventLoop::Alarm::Alarm(
QuicPollEventLoop* loop, QuicArenaScopedPtr<QuicAlarm::Delegate> delegate)
: … { … }
void QuicPollEventLoop::Alarm::SetImpl() { … }
void QuicPollEventLoop::Alarm::CancelImpl() { … }
std::unique_ptr<QuicAlarmFactory> QuicPollEventLoop::CreateAlarmFactory() { … }
int QuicPollEventLoop::PollSyscall(pollfd* fds, size_t nfds, int timeout) { … }
}