Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.1 » MobiLink - 服务器启动的同步 » 服务器启动的同步设置 » 监听器 » 消息处理程序 » 使用消息处理程序

 

设置轻量级轮询选项

可以使用消息处理程序处理轮询操作。轻量级轮询选项允许您指定服务器位置、通告程序名称、轮询频率和轮询键。此外,也可以使用轻量级轮询 API 指定这些属性。

可以通过使用以下语法运行 MobiLink 监听器来指定轻量级轮询选项:

dblsn ... -l 
    "poll_connect=protocol-options;
    poll_notifier=Notifier-name;
    poll_key=identifier-string;
    poll_every=number-of-seconds;..."

一个消息处理程序只能包含以下其中一个选项:

  • poll_connect   此选项用于指定连接到服务器所需的协议选项。此外,也可以使用 dblsn -x 选项指定缺省协议选项。poll_connect 选项覆盖消息处理程序的缺省协议选项。

  • poll_notifier   此选项用于指定 MobiLink 服务器处理推式请求所使用的通告程序。此选项为必需项,因为 MobiLink 服务器可以托管多个通告程序。

  • poll_key   此选项用于向通告程序标识 MobiLink 监听器。MobiLink 服务器使用此值发送计划用于该设备的推式通知。在典型应用程序中,此值应为设备的远程 ID。

  • poll_every   此选项用于指定 MobiLink 监听器轮询通告程序的频率。缺省情况下,MobiLink 监听器自动从 MobiLink 服务器检索此值。此值按秒计量。

 另请参见