QModbusTcpConnectionObserver Class
La clase QModbusTcpConnectionObserver representa la interfaz para los objetos que se pueden pasar a QModbusTcpServer::installConnectionObserver. Más...
| Cabecera: | #include <QModbusTcpConnectionObserver> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS SerialBus)target_link_libraries(mytarget PRIVATE Qt6::SerialBus) |
| qmake: | QT += serialbus |
Funciones públicas
| virtual bool | acceptNewConnection(QTcpSocket *newClient) = 0 |
Descripción detallada
La interfaz debe ser implementada por el desarrollador para poder monitorizar cada conexión TCP entrante desde otro cliente Modbus.
Véase también QModbusTcpServer::installConnectionObserver.
Documentación de las funciones de los miembros
[pure virtual] bool QModbusTcpConnectionObserver::acceptNewConnection(QTcpSocket *newClient)
Esta función es una llamada de retorno para cada conexión TCP entrante. El usuario debe proporcionar newClient para recibir una notificación cuando se establece una nueva conexión de cliente y para determinar si la conexión debe ser aceptada.
La función debe devolver true si se acepta la conexión. En caso contrario, el socket se cierra/rechaza.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.