![]() |
TSDuck v3.46-4965
MPEG Transport Stream Toolkit
|
#include <tsDevice.h>
Public Member Functions | |
| void | reset () |
Static Public Member Functions | |
| static IOSB * | ParentIOSB (::OVERLAPPED *overlap) |
Public Attributes | |
| std::shared_ptr< Object > | app_data {} |
| std::shared_ptr< Object > | async_data {} |
| int | error_code = SYS_SUCCESS |
| ::OVERLAPPED | overlap {} |
| bool | pending = false |
| std::shared_ptr< Object > | react_data {} |
| size_t | sent_size = 0 |
This structure indicates the status of a non-blocking I/O. You must be a former OpenVMS expert to understand the name...
The subclasses which implement non-blocking I/O should use an IOSB* parameter for any I/O operation which can be non-blocking. Typically, if the instance of the subclass is in blocking mode (the default), this parameter must be null. When the instance is in non-blocking mode, this parameter must not be null.
As a general rule, when an I/O method accepts an IOSB* parameter and the I/O is pending (meaning not possible now with non-blocking I/O or in progress with asynchronous I/O), the I/O method sets the pending field tp true and returns a success status. The success returned status means that the I/O was successfully started and the pending field set to true means that the I/O is not completed yet.
|
static |
| void ts::Device::IOSB::reset | ( | ) |
Reset the IOSB for a new I/O operation.
| bool ts::Device::IOSB::pending = false |
This boolean indicates if the I/O is pending.
| int ts::Device::IOSB::error_code = SYS_SUCCESS |
Current error code for the I/O. The value may evolve during the I/O, until completion.
| size_t ts::Device::IOSB::sent_size = 0 |
When pending is true, indicate how many bytes were successfully sent before the I/O would block. Apply to non-blocking I/O only, not asynchronous I/O.
| std::shared_ptr<Object> ts::Device::IOSB::app_data {} |
Shared pointer to application data. This is typically set before starting the I/O at application level.
| std::shared_ptr<Object> ts::Device::IOSB::react_data {} |
Shared pointer to reactive I/O data. This is typically set before starting the I/O at "reactive I/O" level.
| ::OVERLAPPED ts::Device::IOSB::overlap {} |
OVERLAPPED structure for an asynchronous I/O (Windows-specific).
| std::shared_ptr<Object> ts::Device::IOSB::async_data {} |
Shared pointer to asynchronous I/O data (Windows-specific). This is typically set before starting the asynchronous I/O at socket level.