Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
指定 QAnywhere 代理应使用 MobiLink 服务器的动态寻址。
qaagent -xd
当指定 -xd 时,QAnywhere 代理根据消息存储库属性确定 MobiLink 服务器的协议和地址。这意味着它可以动态确定单个 MobiLink 服务器的地址,其中服务器地址取决于正在运行 QAnywhere 代理的设备目前使用的网络。
QAnywhere 应用程序必须初始化描述 MobiLink 服务器通信协议和地址的消息存储库属性,并建立与当前活动网络接口的关系。由于移动设备会在不同网络间切换,QAnywhere 代理会检测处于活动状态的网络,并自动调整 MobiLink 服务器的通信协议和地址—而不必重新启动。
以下示例会设置属性,以便根据设备所处的网络类型使用相应的 MobiLink 地址。例如,如果设备位于 LAN 上,则使用相应的 LAN 地址。
QAManager mgr; ... mgr.SetStringStoreProperty( "LAN.CommunicationAddress", "host=1.2.3.4;port=10997" ); mgr.SetStringStoreProperty( "LAN.CommunicationType", "tcpip" ); mgr.SetStringStoreProperty( "WAN.CommunicationAddress", "host=5.6.7.8;port=7777" ); mgr.SetStringStoreProperty( "WAN.CommunicationType", "tcpip" ); mgr.SetStringStoreProperty( "EL3C589 Ethernet Adapter.type", "LAN" ); mgr.SetStringStoreProperty( "Acme Wireless Adapter.type", "WAN" );