class QModbusTcpConnectionObserver#

The QModbusTcpConnectionObserver class represents the interface for objects that can be passed to installConnectionObserver . More

Synopsis#

Virtual methods#

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description#

The interface must be implemented by the developer to be able to monitor every incoming TCP connection from another Modbus client.

abstract acceptNewConnection(newClient)#
Parameters:

newClientQTcpSocket

Return type:

bool

This function is a callback for every incoming TCP connection. The user should provide newClient to receive a notification when a new client connection is established and to determine whether the connection is to be accepted.

The function should return true if the connection is to be accepted. Otherwise, the socket is closed/rejected.