Skip to content

modbus: add pluggable I/O transport - #875

Open
yoyixms wants to merge 3 commits into
stephane:masterfrom
yoyixms:pluggable-transport
Open

yoyixms wants to merge 3 commits into
stephane:masterfrom
yoyixms:pluggable-transport

Conversation

@yoyixms

@yoyixms yoyixms commented Sep 23, 2026

Copy link
Copy Markdown

modbus_set_transport() overrides the backend send, recv, select, connect, close and flush with caller-provided callbacks, leaving the framing, CRC and protocol logic unchanged; NULL members fall back to the backend

modbus_set_transport() overrides the backend send, recv, select,
connect, close and flush with caller-provided callbacks, leaving the
framing, CRC and protocol logic unchanged; NULL members fall back to
the backend
@cla-bot

cla-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: yoyixms.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@yoyixms yoyixms closed this Sep 23, 2026
@yoyixms yoyixms reopened this Sep 23, 2026
A transport following select(2) returns 0 when the timeout expires, but
the receive loop only knew the backends' -1 with ETIMEDOUT, so it called
recv() on an empty link and reported ECONNRESET, reconnecting when link
error recovery was enabled. The transport contract is now documented.
On Windows the recovery code chose between reconnecting and flushing from
WSAGetLastError(), which only the socket backend sets. A transport reports
its errors through errno, so it was never reconnected. It now follows the
errno rules on every platform, as documented for transports.
@cla-bot

cla-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: yoyixms.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@yoyixms
yoyixms force-pushed the pluggable-transport branch from 206cbbf to 771dc09 Compare September 28, 2026 01:23
@cla-bot

cla-bot Bot commented Sep 28, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient...

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