Skip to content

Add brokered IPv4 TCP clients - #1109

Merged
wdcui merged 14 commits into
uliteboxfrom
wdcui/ulitebox/broker-tcp-clients
Aug 3, 2026
Merged

Add brokered IPv4 TCP clients#1109
wdcui merged 14 commits into
uliteboxfrom
wdcui/ulitebox/broker-tcp-clients

Conversation

@wdcui

@wdcui wdcui commented Jul 30, 2026

Copy link
Copy Markdown
Member

This PR wires IPv4 TCP client sockets through the broker-owned Linux reactor while keeping descriptor flags, blocking behavior, timeouts, polling, and waiters local to LiteBox. It adds operation-scoped shared-buffer transfers and Linux-compatible connect, error, half-close, readiness, MSG_TRUNC, MSG_PEEK, and MSG_WAITALL behavior, plus authoritative names and socket errors. It also adds syscall-rewriter loopback coverage for nonblocking and blocking I/O, large split receives, backpressure, poll/epoll, shutdown, policy failures, resets, and partial-copy faults.

wdcui and others added 13 commits August 3, 2026 05:54
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
Pin receive operations across descriptor reuse, preserve partial-copy and timeout behavior, and make broker socket teardown explicit and abort-aware.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
@wdcui
wdcui force-pushed the wdcui/ulitebox/broker-tcp-clients branch from e73b802 to 106c041 Compare August 3, 2026 12:58
@wdcui
wdcui enabled auto-merge August 3, 2026 12:59
Exercise stream receive validation with writable memory registered in the guest VMA map instead of native test-stack buffers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b5a1a347-37a8-4246-8bbc-306590921475
@wdcui
wdcui added this pull request to the merge queue Aug 3, 2026
Merged via the queue into ulitebox with commit 99efa54 Aug 3, 2026
8 checks passed
@wdcui
wdcui deleted the wdcui/ulitebox/broker-tcp-clients branch August 3, 2026 13:26
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

🤖 SemverChecks 🤖 ⚠️ Potential breaking API changes detected ⚠️

Click for details
--- failure enum_discriminants_undefined_non_unit_variant: enum's variants no longer have defined discriminants due to non-unit variant ---

Description:
An enum's variants no longer have well-defined discriminant values due to a tuple or struct variant in the enum. This breaks downstream code that accesses discriminants via a numeric cast like `as isize`.
        ref: https://doc.rust-lang.org/reference/items/enumerations.html#assigning-discriminant-values
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/enum_discriminants_undefined_non_unit_variant.ron

Failed in:
  enum ChannelReadError in /home/runner/work/litebox/litebox/litebox/src/net/socket_channel.rs:136
  enum ChannelWriteError in /home/runner/work/litebox/litebox/litebox/src/net/socket_channel.rs:151

--- failure enum_variant_added: enum variant added on exhaustive enum ---

Description:
A publicly-visible enum without #[non_exhaustive] has a new variant.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#enum-variant-new
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/enum_variant_added.ron

Failed in:
  variant ChannelWriteError:Socket in /home/runner/work/litebox/litebox/litebox/src/net/socket_channel.rs:165
  variant NetworkProxy:BrokerStream in /home/runner/work/litebox/litebox/litebox/src/net/socket_channel.rs:194
  variant ChannelReadError:WouldBlock in /home/runner/work/litebox/litebox/litebox/src/net/socket_channel.rs:140
  variant ChannelReadError:Socket in /home/runner/work/litebox/litebox/litebox/src/net/socket_channel.rs:146

--- failure inherent_method_missing: pub method removed or renamed ---

Description:
A publicly-visible method or associated fn is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/inherent_method_missing.ron

Failed in:
  Network::set_socket_proxy, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/c0985945b9dd77f3028594f4ba499a9379f1a234/litebox/src/net/mod.rs:814

--- failure enum_missing: pub enum removed or renamed ---

Description:
A publicly-visible enum cannot be imported by its prior path. A `pub use` may have been removed, or the enum itself may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/enum_missing.ron

Failed in:
  enum litebox_broker_core::socket::SocketOutcome, previously in file /home/runner/work/litebox/litebox/target/semver-checks/git-ulitebox/c0985945b9dd77f3028594f4ba499a9379f1a234/litebox_broker_core/src/socket.rs:24

--- failure function_parameter_count_changed: pub fn parameter count changed ---

Description:
A publicly-visible function now takes a different number of parameters.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#fn-change-arity
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/function_parameter_count_changed.ron

Failed in:
  litebox_broker_core::socket::receive now takes 6 parameters instead of 4, in /home/runner/work/litebox/litebox/litebox_broker_core/src/socket.rs:228

--- failure trait_method_parameter_count_changed: pub trait method parameter count changed ---

Description:
A trait method now takes a different number of parameters.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#trait-item-signature
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/trait_method_parameter_count_changed.ron

Failed in:
  PlatformSocket::receive now takes 4 instead of 2 parameters, in file /home/runner/work/litebox/litebox/litebox_broker_core/src/socket.rs:68

--- failure constructible_struct_adds_field: struct exhaustively constructible through public API adds field ---

Description:
A pub struct that could be exhaustively constructed with a literal using only public API has a new pub field, breaking existing exhaustive literals.
        ref: https://doc.rust-lang.org/reference/expressions/struct-expr.html
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/constructible_struct_adds_field.ron

Failed in:
  field SocketStatusResponse.local_address in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/socket.rs:368
  field SocketStatusResponse.pending_error in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/socket.rs:370
  field ReceiveSocketRequest.peek_offset in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/socket.rs:326
  field ReceiveSocketRequest.peek_length in /home/runner/work/litebox/litebox/litebox_broker_protocol/src/socket.rs:328

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