QRemoteObjectRegistryHost Class
Qt Remote Objects 네트워크의 (호스트/레지스트리) 노드입니다. 더 보기...
헤더: | #include <QRemoteObjectRegistryHost> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS RemoteObjects) target_link_libraries(mytarget PRIVATE Qt6::RemoteObjects) |
qmake: | QT += remoteobjects |
상속합니다: | QRemoteObjectHostBase |
공용 함수
QRemoteObjectRegistryHost(const QUrl ®istryAddress = QUrl(), QObject *parent = nullptr) |
재구현된 공용 함수
virtual bool | setRegistryUrl(const QUrl ®istryUrl) override |
상세 설명
QRemoteObjectRegistryHost 클래스는 QtRemoteObjects 네트워크에 대한 진입점을 제공합니다. 네트워크는 두 개의 노드처럼 단순할 수도 있고, 임의로 복잡한 프로세스 및 장치 집합일 수도 있습니다.
QRemoteObjectRegistryHost는 QRemoteObjectHost 가 가진 것과 동일한 기능( QRemoteObjectNode 이 지원하는 모든 것을 포함)을 가지고 있으며, 레지스트리의 소유자이기도 합니다. 이 노드에 연결되는 모든 QRemoteObjectHost 노드는 레지스트리에서 모든 소스 오브젝트를 사용할 수 있게 됩니다.
노드는 하나의 레지스트리에 대한 연결만 지원하므로 레지스트리가 이미 설정되어 있는 상태에서 QRemoteObjectNode::setRegistryUrl 을 호출하면 오류로 간주됩니다. 보안 네트워크와 안전하지 않은 네트워크(서로 다른 레지스트리가 적용될 수 있는 경우)의 경우 별도의 노드를 만들어 각각에 연결하여 사실상 두 개의 독립된 Qt Remote Objects 네트워크를 만드는 것이 좋습니다.
노드는 connectToNode 을 사용하여 서로 직접 연결하거나 QRemoteObjectRegistry 을 사용하여 연결을 간소화할 수 있습니다.
QRemoteObjectRegistry 은 레지스트리 URL에 연결하는 모든 노드에서 사용할 수 있는 특수 복제본입니다. 네트워크의 모든 QRemoteObjectSource 객체에 연결하는 방법을 알고 있습니다.
QRemoteObjectNode 및 QRemoteObjectHost 을참조하세요 .
멤버 함수 문서
QRemoteObjectRegistryHost::QRemoteObjectRegistryHost(const QUrl ®istryAddress = QUrl(), QObject *parent = nullptr)
주어진 parent 로 새로운 QRemoteObjectRegistryHost 노드를 생성합니다. 레지스트리 호스트 노드는 QRemoteObjectHost 노드와 동일한 기능을 갖지만, QRemoteObjectRegistry 에 연결할 수 있는 대신 제공된 호스트 QUrl (registryAddress)가 다른 노드가 연결할 레지스트리의 주소가 된다는 점이 다릅니다.
[override virtual]
bool QRemoteObjectRegistryHost::setRegistryUrl(const QUrl ®istryUrl)
속성에 대한 액세스 함수를 다시 구현합니다: QRemoteObjectNode::registryUrl.
이 메서드는 생성자에서 QUrl 이 설정되지 않은 경우 이 노드의 주소를 registryUrl (다른 노드가 이 노드에 연결할 때 사용)로 설정하는 데 사용할 수 있습니다. 이 노드가 레지스트리가 되므로 이 설정자 메서드를 호출하면 이 노드가 해당 URL을 호스트 주소로 사용합니다. 다른 모든 노드는 QRemoteObjectNode::setRegistryUrl 메서드를 사용하여 레지스트리에 대한 연결을 시작합니다.
레지스트리 주소가 설정되어 있으면 true
을 반환하고, 그렇지 않으면 false
을 반환합니다.
QRemoteObjectRegistryHost() 및 QRemoteObjectNode::setRegistryUrl도 참조하세요 .
© 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.