Skip to content

Adding TCP server handling to libmodbus#610

Open
kjeldflarup wants to merge 1 commit intostephane:masterfrom
deif-wpt:add-tcp-server-3.1.6
Open

Adding TCP server handling to libmodbus#610
kjeldflarup wants to merge 1 commit intostephane:masterfrom
deif-wpt:add-tcp-server-3.1.6

Conversation

@kjeldflarup
Copy link

@kjeldflarup kjeldflarup commented Dec 15, 2021

This is the same as for 3.1.4 #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.

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.
@cla-bot
Copy link

cla-bot bot commented Dec 15, 2021

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:

  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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants