feat(cpp): add functions related to user management, and initial high-level client - #3733
Open
slbotbm wants to merge 12 commits into
Open
feat(cpp): add functions related to user management, and initial high-level client#3733slbotbm wants to merge 12 commits into
slbotbm wants to merge 12 commits into
Conversation
slbotbm
marked this pull request as draft
July 22, 2026 20:01
slbotbm
marked this pull request as ready for review
August 1, 2026 15:21
ethanlin01x
reviewed
Aug 3, 2026
krishvishal
reviewed
Aug 6, 2026
Comment on lines
62
to
69
| /// Creates a new client connection and returns a raw pointer to the underlying [`Client`]. | ||
| /// | ||
| /// # Ownership | ||
| /// | ||
| /// The returned `*mut Client` is owned by the caller (the C++ side). The caller is responsible | ||
| /// for calling [`delete_connection`] exactly once to release the resources. Failing to do so | ||
| /// leaks the underlying tokio runtime resources and the open network connection. | ||
| /// |
Contributor
There was a problem hiding this comment.
This and iggy.hpp:389-395 says destroying the client releases the connection. IggyClient::connect spawns a heartbeat holding its own Arc to the transport, exiting only on ClientShutdown, so the socket, the server session and the ping loop all survive. Same reason :488 ("no effect when already connected") is false and the :501-505 reuse cycle leaks a task per cycle. Worth filing upstream: store the JoinHandle discarded at clients/client.rs:250 and abort it in a Drop for IggyClient.
krishvishal
reviewed
Aug 6, 2026
krishvishal
reviewed
Aug 6, 2026
ethanlin01x
approved these changes
Aug 9, 2026
slbotbm
added a commit
that referenced
this pull request
Aug 10, 2026
## Which issue does this PR address? Relates to #3733 (comment) ## Rationale The heartbeat handle was being discarded and on shutdown, not being stopped on calling `shutdown`. ## What changed? Adds a heartbeat_handler that is saved when `connect()` is called. In case connect is called repeatedly, the code uses the handler, and drops it when the client is destroyed. ## Local Execution - Passed - Pre-commit hooks ran ## AI Usage If AI tools were used, please answer: 1. Which tools? codex 2. Scope of usage? code generation 3. How did you verify the generated code works correctly? tested it 4. Can you explain every line of the code if asked? yes Co-authored-by: Piotr Gankiewicz <piotr.gankiewicz@gmail.com> Co-authored-by: THE Patryk <phuzarski@gmail.com>
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.
Which issue does this PR address?
Closes #
Relates to #2100
Rationale
Works towards completion of cpp client.
What changed?
Adds the following:
and their tests.
Adds high level client that will function as primary API with documentation. The diff looks big since a lot of the public api was changed and aligned to PascalCase. I have not rewritten the tests using the high level client since I would like to do that at once instead of a gradual approach.
Local Execution
AI Usage
If AI tools were used, please answer: