dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::service::platform::pipe Class Reference

Windows: one end of a service's named pipe - a message pipe, read and written overlapped: Windows serializes the synchronous operations on a process' pipes. More...

#include <dx_service_transport.h>

Inheritance diagram for dx::service::platform::pipe:
Collaboration diagram for dx::service::platform::pipe:

Public Member Functions

void free() noexcept override
 operator const os_event() const noexcept
 operator os_event() noexcept
 operator ::HANDLE() const noexcept
void send(const std::vector<uint8_t>& message)
 ~pipe() override

Protected Member Functions

const message* receive(std::stop_token& stop_token) noexcept
 the next message whole, its sizes checked - none where the pipe ended, stops or carried no message
std::optional<::DWORD> wait(::OVERLAPPED& overlapped, std::stop_token& stop_token) noexcept
 an overlapped operation's end, waited for against the stop token: its size, or none where it failed or stops

Static Protected Member Functions

static std::string name(const std::string& id)

Protected Attributes

::HANDLE handle{invalid_t}
::HANDLE process{::GetCurrentProcess()}

Detailed Description

Windows: one end of a service's named pipe - a message pipe, read and written overlapped: Windows serializes the synchronous operations on a process' pipes.

A message is read whole, what the first read leaves (ERROR_MORE_DATA) read behind it. A wait polls against its stop token: a client connecting and leaving ahead of GetOverlappedResult() leaves that call unwakeable by CancelIoEx().

Constructor & Destructor Documentation

◆ ~pipe()

dx::service::platform::pipe::~pipe()
inlineoverride
Here is the call graph for this function:

Member Function Documentation

◆ free()

void dx::service::platform::pipe::free()
inlineoverridevirtualnoexcept

Reimplemented from dx::resource< invalid_t >.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ name()

std::string dx::service::platform::pipe::name(const std::string& id)
inlinestaticprotected
Here is the call graph for this function:

◆ operator const os_event()

template<::HANDLE invalid_t= INVALID_HANDLE_VALUE>
dx::resource<invalid_t>::operator const os_event() const
inlinenoexceptinherited

◆ operator os_event()

template<::HANDLE invalid_t= INVALID_HANDLE_VALUE>
dx::resource<invalid_t>::operator os_event()
inlinenoexceptinherited

◆ operator ::HANDLE()

template<::HANDLE invalid_t= INVALID_HANDLE_VALUE>
dx::resource<invalid_t>::operator ::HANDLE() const
inlinenoexceptinherited
Here is the caller graph for this function:

◆ receive()

const message* dx::service::platform::pipe::receive(std::stop_token& stop_token)
inlineprotectednoexcept

the next message whole, its sizes checked - none where the pipe ended, stops or carried no message

Here is the call graph for this function:

◆ send()

void dx::service::platform::pipe::send(const std::vector<uint8_t>& message)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wait()

std::optional<::DWORD> dx::service::platform::pipe::wait(::OVERLAPPED& overlapped, std::stop_token& stop_token)
inlineprotectednoexcept

an overlapped operation's end, waited for against the stop token: its size, or none where it failed or stops

Here is the caller graph for this function:

Member Data Documentation

◆ handle

template<::HANDLE invalid_t= INVALID_HANDLE_VALUE>
::HANDLE dx::resource<invalid_t>::handle{invalid_t}
protectedinherited

◆ process

template<::HANDLE invalid_t= INVALID_HANDLE_VALUE>
::HANDLE dx::resource<invalid_t>::process{::GetCurrentProcess()}
protectedinherited

The documentation for this class was generated from the following file: