AuroraRuntime/Source/IO/AuIOWaitableIOLoopSource.hpp

36 lines
1.1 KiB
C++
Raw Normal View History

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: AuIOWaitableIOLoopSource.hpp
Date: 2022-6-6
Author: Reece
***/
#pragma once
namespace Aurora::IO
{
struct IOWatachableIOLoopSource : IIOWatachableIOLoopSource
{
IOWatachableIOLoopSource(const AuSPtr<Loop::ILoopSource>&pSource);
IOWatachableIOLoopSource(const AuSPtr<Loop::ILoopSource>&pSource, AuUInt32 ioTimeoutMS);
bool IsRunOnOtherTick() override;
bool IsRunOnTick() override;
bool CanRequestTick() override;
void OnReportPumper(const AuSPtr<IIOProcessorManualInvoker> &iface) override;
bool IsRunOnSelfIO() override;
AuSPtr<Loop::ILoopSource> GetSelfIOSource() override;
bool ApplyRateLimit() override;
AuUInt32 IOTimeoutInMS() override;
AuSPtr<Loop::ILoopSource> GetLoopSource() override;
AuSPtr<Loop::ILoopSource> SetLoopSource(const AuSPtr<Loop::ILoopSource> &pSource) override;
bool IsRunOnSelfIOCheckedOnTimerTick() override;
AuSPtr<Loop::ILoopSource> pSource;
AuUInt32 dwIoTimeoutMS{};
};
}