[+] IAsyncTransaction::HasCompleted
This commit is contained in:
parent
df6f29bf38
commit
424cccd00a
@ -37,6 +37,12 @@ namespace Aurora::IO
|
||||
* @return
|
||||
*/
|
||||
virtual bool Failed() = 0;
|
||||
|
||||
/**
|
||||
* @brief non-blocking is-signaled (...and dispatched via ::Complete() or other IO yield)
|
||||
* @return
|
||||
*/
|
||||
virtual bool HasCompleted() = 0;
|
||||
|
||||
/**
|
||||
* @brief
|
||||
|
@ -439,6 +439,11 @@ namespace Aurora::IO::FS
|
||||
return false;
|
||||
}
|
||||
|
||||
bool LinuxAsyncFileTransaction::HasCompleted()
|
||||
{
|
||||
return this->bTxFinished_;
|
||||
}
|
||||
|
||||
bool LinuxAsyncFileTransaction::Failed()
|
||||
{
|
||||
return this->hasError_;
|
||||
|
@ -61,10 +61,13 @@ namespace Aurora::IO::FS
|
||||
bool StartRead(AuUInt64 offset, const AuSPtr<AuMemoryViewWrite> &memoryView) override;
|
||||
bool StartWrite(AuUInt64 offset, const AuSPtr<AuMemoryViewRead> &memoryView) override;
|
||||
|
||||
bool Complete() override;
|
||||
|
||||
bool Failed() override;
|
||||
AuUInt GetOSErrorCode() override;
|
||||
|
||||
bool Complete() override;
|
||||
bool HasCompleted() override;
|
||||
|
||||
AuUInt32 GetLastPacketLength() override;
|
||||
|
||||
void SetCallback(const AuSPtr<IAsyncFinishedSubscriber> &sub) override;
|
||||
|
@ -539,6 +539,12 @@ namespace Aurora::IO::FS
|
||||
return CompleteEx(false);
|
||||
}
|
||||
|
||||
bool NtAsyncFileTransaction::HasCompleted()
|
||||
{
|
||||
return bool(this->dwLastBytes) ||
|
||||
this->bHasFailed;
|
||||
}
|
||||
|
||||
AuUInt32 NtAsyncFileTransaction::GetLastPacketLength()
|
||||
{
|
||||
return this->dwLastBytes;
|
||||
|
@ -43,6 +43,8 @@ namespace Aurora::IO::FS
|
||||
|
||||
bool isIrredeemable_ {};
|
||||
|
||||
bool HasCompleted() override;
|
||||
|
||||
bool Complete() override;
|
||||
|
||||
bool CompleteEx(AuUInt completeRoutine, bool bForce = false);
|
||||
|
@ -226,6 +226,12 @@ namespace Aurora::IO::Net
|
||||
return this->bHasFailed;
|
||||
}
|
||||
|
||||
bool LinuxAsyncNetworkTransaction::HasCompleted()
|
||||
{
|
||||
return this->bHasFailed ||
|
||||
this->dwLastBytes;
|
||||
}
|
||||
|
||||
AuUInt LinuxAsyncNetworkTransaction::GetOSErrorCode()
|
||||
{
|
||||
return this->dwOsErrorCode;
|
||||
|
@ -33,6 +33,8 @@ namespace Aurora::IO::Net
|
||||
bool Failed() override;
|
||||
AuUInt GetOSErrorCode() override;
|
||||
|
||||
bool HasCompleted() override;
|
||||
|
||||
AuUInt32 GetLastPacketLength() override;
|
||||
|
||||
void SetCallback(const AuSPtr<IAsyncFinishedSubscriber> &sub) override;
|
||||
|
@ -362,6 +362,12 @@ namespace Aurora::IO::Net
|
||||
this->dwOsErrorCode != ERROR_HANDLE_EOF;
|
||||
}
|
||||
|
||||
bool NtAsyncNetworkTransaction::HasCompleted()
|
||||
{
|
||||
return this->bHasFailed ||
|
||||
this->dwLastBytes;
|
||||
}
|
||||
|
||||
AuUInt NtAsyncNetworkTransaction::GetOSErrorCode()
|
||||
{
|
||||
return this->dwOsErrorCode;
|
||||
|
@ -24,14 +24,16 @@ namespace Aurora::IO::Net
|
||||
bool StartRead(AuUInt64 offset, const AuSPtr<AuMemoryViewWrite> &memoryView) override;
|
||||
bool StartWrite(AuUInt64 offset, const AuSPtr<AuMemoryViewRead> &memoryView) override;
|
||||
|
||||
bool Complete() override;
|
||||
|
||||
bool CompleteEx(AuUInt completeRoutine, bool bForce = false);
|
||||
|
||||
bool Complete() override;
|
||||
|
||||
bool Failed() override;
|
||||
bool HasErrorCode();
|
||||
AuUInt GetOSErrorCode() override;
|
||||
|
||||
bool HasCompleted() override;
|
||||
|
||||
AuUInt32 GetLastPacketLength() override;
|
||||
|
||||
void SetCallback(const AuSPtr<IAsyncFinishedSubscriber> &sub) override;
|
||||
|
Loading…
Reference in New Issue
Block a user