Repository navigation
Refactor PIMEClient to use RpcPipe RAII abstraction - #979
Merged
Merged
Conversation
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR encapsulates named pipe handle and overlapped I/O management into a dedicated
RpcPipeRAII class and refactorsPIMEClientto use it:RpcPipeRAII transport: Manages pipe handle lifecycle, overlapped I/O event creation/cleanup, and line-delimited message framing.PIMEClient: Eliminates looseHANDLE pipe_,HANDLE ioEvent_,readBuffer_, and boilerplate methods (callPipeIO,callRpcPipe,connectPipe,closeRpcConnection).json::parseandtry/catchwithparseJsonNoThrowandjsonValueOr.This is Part 1 of the asynchronous connection refactoring. Part 2 will build upon
RpcPipeto introduceAsyncConnectorand non-blocking background connection.Generated with assistance from Google Antigravity (Gemini 3.8 Flash).