Skip to content

[codex] Add synchronous named pipe client - #16

Merged
LimiNode merged 7 commits into
mainfrom
codex/add-named-pipe-client
Jul 1, 2026
Merged

[codex] Add synchronous named pipe client#16
LimiNode merged 7 commits into
mainfrom
codex/add-named-pipe-client

Conversation

@LimiNode

@LimiNode LimiNode commented Jul 1, 2026

Copy link
Copy Markdown
Owner

What Changed

  • Added NamedPipeClient with synchronous connect/open, write, blocking read, try_read, timeout read, available, flush, and basic callbacks.
  • Added ClientConfig for pipe name, buffer size, and timeout.
  • Added a SimpleNamedPipeClient static target and wired it into examples/tests when static mode is enabled.
  • Added a Windows client_server_test that starts NamedPipeServer, connects the C++ client, sends ping, and reads Echo: ping.
  • Extended ODR compile coverage to include NamedPipeClient.hpp.
  • Fixed static-library mode for .ipp implementations by emitting out-of-line definitions when SIMPLE_NAMED_PIPE_STATIC_LIB is set, while keeping inline definitions for header-only mode.
  • Documented the minimal C++ client in README.md.

Why

SimpleNamedPipe had a solid C++ server and an MQL5 client, but no C++ client for tests or lightweight local integrations. optionx_cpp needs 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_INLINE macro 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=ON
  • cmake --build build-codex-mingw --target client_server_test --parallel 4
  • ./build-codex-mingw/client_server_test.exe
  • cmake --build build-codex-mingw --parallel 4
  • cmake -S . -B build-codex-header -G "MinGW Makefiles" -DSIMPLE_NAMED_PIPE_BUILD_TESTS=ON -DSIMPLE_NAMED_PIPE_BUILD_STATIC=OFF
  • cmake --build build-codex-header --target client_server_test --parallel 4
  • ./build-codex-header/client_server_test.exe
  • Manual ODR command equivalent to tests/odr/run_odr_test.sh using g++, tests/stubs, and both ODR translation units.
  • git diff --check

Note: 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.

LimiNode added 2 commits July 1, 2026 18:42
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
LimiNode marked this pull request as ready for review July 1, 2026 19:05
@LimiNode
LimiNode merged commit 179e5cc into main Jul 1, 2026
5 checks passed
@LimiNode
LimiNode deleted the codex/add-named-pipe-client branch July 1, 2026 22:04
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