Skip to content

feat(net): incoming stream#759

Merged
Berrysoft merged 9 commits into
compio-rs:masterfrom
Berrysoft:dev/incoming
Mar 11, 2026
Merged

feat(net): incoming stream#759
Berrysoft merged 9 commits into
compio-rs:masterfrom
Berrysoft:dev/incoming

Conversation

@Berrysoft
Copy link
Copy Markdown
Member

No description provided.

@Berrysoft Berrysoft requested a review from Copilot March 11, 2026 07:25
@Berrysoft Berrysoft self-assigned this Mar 11, 2026
@Berrysoft Berrysoft added enhancement New feature or request package: net Related to compio-net labels Mar 11, 2026
@Berrysoft Berrysoft mentioned this pull request Mar 11, 2026
10 tasks
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an “incoming connection stream” API to compio-net listeners so callers can iterate over accepted connections as a futures_util::Stream, with per-connection SocketOpts support.

Changes:

  • Add TcpListener::incoming* and UnixListener::incoming* returning Streams of accepted connections.
  • Implement an internal Socket::incoming() stream (Incoming) with platform-specific accept logic (AcceptMulti on Unix, state machine on Windows).
  • Add a TCP-focused integration test and promote futures-util to a normal dependency.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
compio-net/tests/incoming.rs New integration test for TcpListener::incoming()
compio-net/src/unix.rs Add UnixListener::incoming* + UnixIncoming stream wrapper applying SocketOpts
compio-net/src/tcp.rs Add TcpListener::incoming* + TcpIncoming stream wrapper applying SocketOpts
compio-net/src/socket.rs Add internal Incoming accept stream and Socket::incoming() constructor
compio-net/Cargo.toml Add futures-util as a non-dev dependency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread compio-net/src/unix.rs
Comment thread compio-net/src/socket.rs Outdated
Comment thread compio-net/src/socket.rs Outdated
Comment thread compio-net/tests/incoming.rs
Comment thread compio-net/src/socket.rs Outdated
Comment thread compio-net/src/socket.rs Outdated
@Berrysoft Berrysoft requested a review from George-Miao March 11, 2026 07:50
Copy link
Copy Markdown
Member

@George-Miao George-Miao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Berrysoft Berrysoft merged commit e42c6f1 into compio-rs:master Mar 11, 2026
63 checks passed
@Berrysoft Berrysoft deleted the dev/incoming branch March 11, 2026 14:12
@github-actions github-actions Bot mentioned this pull request Mar 11, 2026
@Berrysoft Berrysoft added this to the v0.19 milestone Mar 11, 2026
This was referenced Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request package: net Related to compio-net

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants