Skip to content

Refactor PIMEClient to use RpcPipe RAII abstraction - #979

Merged
PCMan merged 2 commits into
masterfrom
refactor/rpc-pipe
Oct 21, 2026
Merged

PCMan merged 2 commits into
masterfrom
refactor/rpc-pipe

Conversation

@PCMan

@PCMan PCMan commented Oct 21, 2026

Copy link
Copy Markdown
Member

This PR encapsulates named pipe handle and overlapped I/O management into a dedicated RpcPipe RAII class and refactors PIMEClient to use it:

  • RpcPipe RAII transport: Manages pipe handle lifecycle, overlapped I/O event creation/cleanup, and line-delimited message framing.
  • Clean PIMEClient: Eliminates loose HANDLE pipe_, HANDLE ioEvent_, readBuffer_, and boilerplate methods (callPipeIO, callRpcPipe, connectPipe, closeRpcConnection).
  • SEH safety: Replaces throwing json::parse and try/catch with parseJsonNoThrow and jsonValueOr.

This is Part 1 of the asynchronous connection refactoring. Part 2 will build upon RpcPipe to introduce AsyncConnector and non-blocking background connection.

Generated with assistance from Google Antigravity (Gemini 3.8 Flash).

PCMan added 2 commits October 21, 2026 00:04
Encapsulate named pipe handle lifecycle, overlapped I/O event management, and line-delimited message framing into a move-only class.
Provide clean RAII cleanup to prevent handle or event leaks across client sessions.

Generated with assistance from Google Antigravity (Gemini 3.8 Flash)
Replace raw HANDLE, manual overlapped I/O buffers, and event handles in PIMEClient with RpcPipe.
Remove redundant low-level methods (callPipeIO, callRpcPipe, connectPipe, closeRpcConnection) from Client.
Replace throwing json::parse and try/catch blocks with parseJsonNoThrow and jsonValueOr for SEH safety in host applications.

Generated with assistance from Google Antigravity (Gemini 3.8 Flash)
@PCMan PCMan self-assigned this Oct 21, 2026
@PCMan
PCMan merged commit 007dc46 into master Oct 21, 2026
4 of 6 checks passed
@PCMan
PCMan deleted the refactor/rpc-pipe branch October 21, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant