[+] Readd IPCPipe nt nonblock read (copy of process)

This commit is contained in:
Reece Wilson 2022-05-01 20:16:36 +01:00
parent 62e822f532
commit 2bfa4b0100

View File

@ -202,6 +202,22 @@ namespace Aurora::IPC
return false; return false;
} }
if (nonblocking || !write.ptr)
{
DWORD avail {};
if (!PeekNamedPipe(h, NULL, NULL, NULL, &avail, NULL))
{
return false;
}
if (!avail)
{
return true;
}
size = AuMin(size, avail);
}
if (!write.ptr) if (!write.ptr)
{ {
write.outVariable = size; write.outVariable = size;