IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QModbusTcpConnectionObserver Class

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

This class was introduced in Qt 5.13.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QModbusTcpConnectionObserver Class

  • Header: QModbusTcpConnectionObserver

  • Since: Qt 5.13

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS SerialBus)

    target_link_libraries(mytarget PRIVATE Qt6::SerialBus)

  • qmake: QT += serialbus

Detailed Description

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

See Also

Member Function Documentation

 

[pure virtual] bool QModbusTcpConnectionObserver::acceptNewConnection(QTcpSocket *newClient)

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.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+