2022-06-21 04:49:36 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
|
|
|
File: IOPipeInputData.hpp
|
|
|
|
Date: 2022-6-20
|
|
|
|
Author: Reece
|
|
|
|
***/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Aurora::IO
|
|
|
|
{
|
|
|
|
struct IIOWaitableItem;
|
|
|
|
|
|
|
|
struct IOPipeInputData
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @brief IO trigger
|
|
|
|
*/
|
2022-08-29 15:46:46 +00:00
|
|
|
AuSPtr<IIOWaitableItem> pWatchItem;
|
2022-06-21 04:49:36 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Input source
|
|
|
|
*/
|
2022-08-29 15:46:46 +00:00
|
|
|
AuSPtr<IStreamReader> pReader;
|
2022-06-21 04:49:36 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Callbacks
|
|
|
|
*/
|
2022-08-29 15:46:46 +00:00
|
|
|
AuSPtr<IPipeBackend> pBackend;
|
2022-06-21 04:49:36 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Enables aggressive stream consumption, allowing for bias towards clients if they were to send a lot of data (including dos)
|
|
|
|
* Instead of reading the input stream once, so long as the output stream written paremeter yields a non-zero number, bytes
|
|
|
|
* will continue to pump through the writer. Breakdown of the pipe is expected on reader oversaturation as defined by the
|
|
|
|
* IOPipeRequest
|
|
|
|
*/
|
|
|
|
bool bShouldReadUntilZero {};
|
|
|
|
};
|
|
|
|
}
|