QModbusTcpConnectionObserver#

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

Synopsis#

Virtual functions#

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.

class PySide6.QtSerialBus.QModbusTcpConnectionObserver#
abstract PySide6.QtSerialBus.QModbusTcpConnectionObserver.acceptNewConnection(newClient)#
Parameters:

newClientPySide6.QtNetwork.QTcpSocket

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.