Qt Remote Objects 注册表
注册表为建立这些连接提供了一种更简单的方法。每个想加入注册表网络的节点都会连接到注册表。注册表本身是一个专门的源对象,因此由一个节点托管。连接到注册表只需将注册表的 URL 传递给QRemoteObjectNode 或QRemoteObjectHost 构造函数,或将 URL 传递给 setRegistryUrl 方法即可。
注册表与 QtRO 紧密集成。每当添加或删除一个Source时,注册表中的名称/URL 都会自动更新。因此,一旦您的节点连接到注册表,就无需再手动连接任何其他节点。如果你请求网络上的一个对象,而你没有连接到托管节点,注册表会知道要连接到哪个 URL,并启动连接。一旦连接成功(可用对象的列表已传送过来,包括所需的源代码),请求的副本的初始化过程将自动启动。
© 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.