[idd] driver: implement reading in pipe server

Following the example of CPipeClient in the helper, this switches to using
overlapped I/O for easy interruption and cancellation that doesn't quite
work with CancelSynchronousIO.
This commit is contained in:
Quantum
2026-06-04 23:44:35 -04:00
committed by Geoffrey McRae
parent 0664e510a2
commit 3aa6492760
2 changed files with 113 additions and 20 deletions

View File

@@ -1,4 +1,4 @@
/**
/**
* Looking Glass
* Copyright © 2017-2026 The Looking Glass Authors
* https://looking-glass.io
@@ -35,8 +35,9 @@ using namespace Microsoft::WRL::Wrappers::HandleTraits;
class CPipeServer
{
private:
HandleT<HANDLENullTraits> m_pipe;
HandleT<HANDLETraits> m_pipe;
HandleT<HANDLENullTraits> m_thread;
HandleT<EventTraits> m_signal;
std::vector<LGPipeMsg> m_queue;
bool m_running = false;
@@ -49,6 +50,8 @@ class CPipeServer
void WriteMsg(const LGPipeMsg & msg);
void HandleReloadSettings();
public:
~CPipeServer() { DeInit(); }