QModbusTcpConnectionObserver Class

QModbusTcpConnectionObserver クラスは、QModbusTcpServer::installConnectionObserver に渡されるオブジェクトのインターフェイスを表します。詳細...

ヘッダー #include <QModbusTcpConnectionObserver>
CMake: find_package(Qt6 REQUIRED COMPONENTS SerialBus)
target_link_libraries(mytarget PRIVATE Qt6::SerialBus)
qmake: QT += serialbus

パブリック関数

virtual bool acceptNewConnection(QTcpSocket *newClient) = 0

詳細説明

別の Modbus クライアントからのすべての着信 TCP 接続を監視できるように、このインターフェースを開発者が実装する必要があります。

QModbusTcpServer::installConnectionObserverも参照してください

メンバ関数ドキュメント

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

この関数は、すべての着信TCP接続に対するコールバックである。新しいクライアント接続が確立されたときに通知を受け取り、その接続を受け入れるかどうかを決定するために、ユーザはnewClient

接続が受け入れられた場合、この関数はtrue を返す。そうでない場合、ソケットはクローズ/リジェクトされる。

© 2025 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.