libmodbus
libmodbus copied to clipboard
Adding TCP server handling to libmodbus
This is the same as for 3.1.4 https://github.com/stephane/libmodbus/pull/341
When creating a modbus server you must create your own TCP / socket server for libmodbus. This commit aims to integrate this handling into libmodbus.
Features:
- Function to create a TCP server context where you specify port, ip and max_connection.
- Handle function which must be called from a task or loop.
- Destroy function with cleans up and correctly closes all current connections.
- Function to change select timeout
Uses the modbus specifications method of 'disconnecting the last used connection if max_connection is reached' when accepting new incoming connections.
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Johnny Rasmussen. This is most likely caused by a git client misconfiguration; please make sure to:
- check if your git client is configured with an email to sign commits
git config --list | grep email
- If not, set it up using
git config --global user.email [email protected]
- Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails