[codex] Add synchronous named pipe client - #16
Merged
Conversation
Add a C++ NamedPipeClient with synchronous connect, read, write, timeout read, and basic callbacks. Wire a static client target, add a Windows server/client round-trip test, extend ODR coverage, and make .ipp definitions emit out-of-line symbols in static-library mode.
LimiNode
marked this pull request as ready for review
July 1, 2026 19:05
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.
What Changed
NamedPipeClientwith synchronousconnect/open,write, blockingread,try_read, timeout read,available,flush, and basic callbacks.ClientConfigfor pipe name, buffer size, and timeout.SimpleNamedPipeClientstatic target and wired it into examples/tests when static mode is enabled.client_server_testthat startsNamedPipeServer, connects the C++ client, sendsping, and readsEcho: ping.NamedPipeClient.hpp..ippimplementations by emitting out-of-line definitions whenSIMPLE_NAMED_PIPE_STATIC_LIBis set, while keepinginlinedefinitions for header-only mode.README.md.Why
SimpleNamedPipehad a solid C++ server and an MQL5 client, but no C++ client for tests or lightweight local integrations.optionx_cppneeds a C++ client-side pipe API before adding a legacy bridge based on this library.The new integration test also exposed that static-library consumers no longer received symbols after the server implementation was made inline. The
SIMPLE_NAMED_PIPE_INLINEmacro preserves both modes: header-only remains inline and static-library builds produce real symbols.Validation
cmake -S . -B build-codex-mingw -G "MinGW Makefiles" -DSIMPLE_NAMED_PIPE_BUILD_TESTS=ONcmake --build build-codex-mingw --target client_server_test --parallel 4./build-codex-mingw/client_server_test.execmake --build build-codex-mingw --parallel 4cmake -S . -B build-codex-header -G "MinGW Makefiles" -DSIMPLE_NAMED_PIPE_BUILD_TESTS=ON -DSIMPLE_NAMED_PIPE_BUILD_STATIC=OFFcmake --build build-codex-header --target client_server_test --parallel 4./build-codex-header/client_server_test.exetests/odr/run_odr_test.shusingg++,tests/stubs, and both ODR translation units.git diff --checkNote: local PowerShell environment does not have
bash, so the shell wrapper itself was not run locally. The same compile/link commands were executed manually; GitHub Ubuntu workflow should still run the script.