add async_cmd_getsockname#37
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new io_uring “command” wrapper for getsockname to the Condy async operations layer, along with tests and documentation updates.
Changes:
- Add
condy::async_cmd_getsockname()wrapper (guarded for liburing >= 2.13). - Add basic and fixed-fd test cases for
async_cmd_getsockname(). - Update ops documentation to include
async_nop128()andasync_cmd_getsockname().
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
include/condy/async_operations.hpp |
Introduces the new async_cmd_getsockname() wrapper using the existing op-awaiter pattern. |
tests/test_async_operations.4.cpp |
Adds new test coverage for async_cmd_getsockname() and fixes SO_REUSEADDR option value initialization in existing tests. |
docs/ops.md |
Documents the newly exposed operations in the operation list. |
Comments suppressed due to low confidence (1)
tests/test_async_operations.4.cpp:302
- In the "cmd_sock - fixed fd" test,
listen_fdis never closed aftersync_wait, unlike the other socket tests in this file. This can leak file descriptors across the test suite; add aclose(listen_fd)(or a RAII/defer cleanup) after the coroutine completes.
int val = 1;
r = co_await condy::async_cmd_sock(SOCKET_URING_OP_SETSOCKOPT,
condy::fixed(0), SOL_SOCKET,
SO_REUSEADDR, &val, sizeof(val));
REQUIRE(r == 0);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9741142 to
82cd717
Compare
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.
No description provided.