[+] ENetworkError::eBrokenByteBuffer

This commit is contained in:
Reece Wilson 2023-10-23 11:18:07 +01:00
parent 72fd8d018e
commit 08c37454fe
3 changed files with 16 additions and 0 deletions

View File

@ -33,6 +33,7 @@ namespace Aurora::IO::Net
eServiceRefused,
eServiceTaken,
eBrokenAIOPipe,
eBrokenByteBuffer
eUnknown
));
}

View File

@ -126,6 +126,14 @@ namespace Aurora::IO::Net
void SocketChannelInput::OnPipePartialEvent(AuUInt transferred)
{
// Other method is used
if (auto pBuffer = this->AsReadableByteBuffer())
{
if (pBuffer->HasStreamError())
{
this->pParent_->SendErrorBeginShutdown(AuNet::ENetworkError::eBrokenByteBuffer);
}
}
}
void SocketChannelInput::OnPipeReallocEvent(bool bSuccess)

View File

@ -237,6 +237,13 @@ namespace Aurora::IO::Net
else
{
this->pNetWriteTransaction_->SetCallback({});
if (this->outputBuffer_.HasStreamError())
{
this->pParent_->SendErrorBeginShutdown(AuNet::ENetworkError::eBrokenByteBuffer);
return true;
}
if (this->bShutdownOnComplete)
{
return true;