Skip to content

Conversation

@eigen-value
Copy link
Collaborator

This PR implements TCP client (with SSL connection option) and TCP server classes + test examples

solves #3

fix: client _read not passing connection_id
impr: server tcp/closeListener method
examples: client and clientSSL
feat: tcp_client getId method

feat: server-side client connection/disconnection

examples: server.ino with python test script
@eigen-value eigen-value requested review from cmaglie and gbr1 September 16, 2025 09:51
@eigen-value eigen-value linked an issue Sep 16, 2025 that may be closed by this pull request
Copy link
Collaborator

@gbr1 gbr1 left a comment

Choose a reason for hiding this comment

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

Please:

@per1234 per1234 added the enhancement New feature or request label Sep 16, 2025
@eigen-value
Copy link
Collaborator Author

After a successful run of the tcp_server example if I do arduino-reset I get the following error:

2025/09/17 13:28:57 DEBUG Received response method=tcp/listen result=<nil> error="[2 Failed to start listening on address: listen tcp 127.0.0.1:5678: bind: address already in use]"

The router has a stale listener on reset.
Is there a way to handle tcp\listen multiple attempts on the same host+port? @cmaglie

@eigen-value
Copy link
Collaborator Author

Please:

  • convert Serial to Monitor;
  • in SSL client example, don't use Ubi's website, use arduino tips instead
  • @cmaglie there is a conflict on tcp_server generated by this: bcmi-labs/orchestrator#658

@gbr1 Updated and ready

@gbr1 gbr1 self-requested a review September 19, 2025 13:57
Copy link
Collaborator

@gbr1 gbr1 left a comment

Choose a reason for hiding this comment

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

LGTM, tested all examples

@gbr1 gbr1 merged commit 9226bd1 into main Sep 19, 2025
@gbr1 gbr1 deleted the 3-add-a-class-for-tcp-socket-clientserver branch September 19, 2025 13:58
@eigen-value eigen-value restored the 3-add-a-class-for-tcp-socket-clientserver branch September 30, 2025 08:30
@eigen-value eigen-value deleted the 3-add-a-class-for-tcp-socket-clientserver branch November 10, 2025 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a class for TCP socket Client/Server

4 participants