Skip to content

feat(tcp-connector): add Embassy TCP listener pool#171

Merged
lxsaah merged 1 commit into
aimdb-dev:mainfrom
thaodt:feat/issue-168
Jul 9, 2026
Merged

feat(tcp-connector): add Embassy TCP listener pool#171
lxsaah merged 1 commit into
aimdb-dev:mainfrom
thaodt:feat/issue-168

Conversation

@thaodt

@thaodt thaodt commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Description

  • Add TcpServer::<N>::with_buffers(...) for Embassy TCP servers, using an explicit N-socket RX/TX buffer pool.
  • Keep one Embassy accept worker per active socket slot so N >= 2 can accept concurrent inbound TCP clients.
  • Rework Embassy TCP connection recycling so sockets return to the pool after disconnect/session exit.
  • Make the Embassy TCP client/dialer reusable across failed connects and dropped links.
  • Tighten tcp:// endpoint validation, including bracketed IPv6 support and rejection of naked IPv6 targets.
  • Clean up aimdb-tcp-connector feature dependencies and include tokio-knx-connector-demo in fmt-check.

Related Issue

Checklist

  • I have read the CONTRIBUTING.md document.
  • My code follows the project's coding standards.
  • I have added tests to cover my changes.
  • All new and existing tests passed (make check).
  • I have updated the documentation accordingly.

Implement the Embassy TCP server as an explicit N-socket pool backed by
caller-owned RX/TX buffers and make the Embassy TCP dialer reusable across
disconnects/redials.

Also tighten `tcp://` endpoint validation for IPv6 targets, clean up TCP connector
feature dependencies and include the tokio KNX demo in fmt-check coverage.
@thaodt
thaodt requested a review from lxsaah as a code owner July 9, 2026 09:56

@lxsaah lxsaah left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good to me!

Thanks a lot.

@lxsaah
lxsaah merged commit 355c146 into aimdb-dev:main Jul 9, 2026
8 checks passed
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.

aimdb-tcp-connector: Embassy TCP server + follow-ups from #166

2 participants