Skip to content

feat(local): close POSIX/Windows gaps for local stream sockets#252

Open
mvandeberg wants to merge 1 commit into
cppalliance:developfrom
mvandeberg:pr/windows-local-socket-parity
Open

feat(local): close POSIX/Windows gaps for local stream sockets#252
mvandeberg wants to merge 1 commit into
cppalliance:developfrom
mvandeberg:pr/windows-local-socket-parity

Conversation

@mvandeberg
Copy link
Copy Markdown
Contributor

  • Add Windows make_local_stream_pair() via temp-listener emulation of socketpair(), enabling socket-pair tests on IOCP
  • Implement assign_socket() in win_local_stream_service so raw SOCKET handles can be registered with the IOCP port
  • Enable local_stream_socket tests on Windows (construction, open, move, connect/accept, read/write, available, release)
  • Add portable temp_socket_dir helper using std::filesystem for temp paths across platforms
  • Guard local datagram code (SOCK_DGRAM) as POSIX-only at compile time — Windows does not support AF_UNIX SOCK_DGRAM
  • Remove dead IOCP datagram implementation files (win_local_dgram_service.hpp, win_local_dgram_socket.hpp)
  • Document Windows limitation on local_datagram_socket and local_datagram headers

@cppalliance-bot
Copy link
Copy Markdown

cppalliance-bot commented May 19, 2026

An automated preview of the documentation is available at https://252.corosio.prtest3.cppalliance.org/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-05-20 17:03:28 UTC

@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.76%. Comparing base (f17d881) to head (d57e9f5).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #252   +/-   ##
========================================
  Coverage    77.76%   77.76%           
========================================
  Files           96       96           
  Lines         7264     7264           
  Branches      1775     1775           
========================================
  Hits          5649     5649           
  Misses        1104     1104           
  Partials       511      511           
Files with missing lines Coverage Δ
src/corosio/src/io_context.cpp 95.83% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f17d881...d57e9f5. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mvandeberg mvandeberg force-pushed the pr/windows-local-socket-parity branch from d852a7a to c25be62 Compare May 20, 2026 16:06
@cppalliance-bot
Copy link
Copy Markdown

cppalliance-bot commented May 20, 2026

GCOVR code coverage report https://252.corosio.prtest3.cppalliance.org/gcovr/index.html
LCOV code coverage report https://252.corosio.prtest3.cppalliance.org/genhtml/index.html
Coverage Diff Report https://252.corosio.prtest3.cppalliance.org/diff-report/index.html

Build time: 2026-05-20 17:11:34 UTC

- Add Windows make_local_stream_pair() via temp-listener emulation
  of socketpair(), enabling socket-pair tests on IOCP
- Implement assign_socket() in win_local_stream_service so raw
  SOCKET handles can be registered with the IOCP port
- Replace ConnectEx/AcceptEx with blocking connect()/accept() on
  worker threads for AF_UNIX — the IOCP extension functions are
  not reliable for AF_UNIX on all Windows versions
- Enable local_stream_socket tests on Windows (construction, open,
  move, connect/accept, read/write, available, release)
- Add portable temp_socket_dir helper using std::filesystem for
  temp paths across platforms
- Guard local datagram code (SOCK_DGRAM) as POSIX-only at compile
  time — Windows does not support AF_UNIX SOCK_DGRAM
- Remove dead IOCP datagram implementation files
  (win_local_dgram_service.hpp, win_local_dgram_socket.hpp)
- Document Windows limitation on local_datagram_socket and
  local_datagram headers
@mvandeberg mvandeberg force-pushed the pr/windows-local-socket-parity branch from c25be62 to d57e9f5 Compare May 20, 2026 17:00
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.

2 participants