0

我已经在 iOS 设备上设置了一个带有端口的服务器,并以编程方式订阅了这样的上下文代理:

{
  "notifyConditions": [
    {
      "type": "ONTIMEINTERVAL",
      "condValues": [
        "PT10s"
      ]
    }
  ],
  "reference": "http://myipaddress:1028/",
  "entities": [
    {
      "type": "Warning",
      "id": "NotMatch",
      "isPattern": "false"
    }
  ],
  "attributes": [
    "difference"
  ],
  "duration": "P1M"
}

并得到这样的回应:

{
  subscribeResponse = {
    duration = P1M;
    subscriptionId = 54b019b9a85d634562fd252f;
  };
}

但我无法收到任何事件通知。如果我将引用设置为: "reference": "http://localhost:1028/accumulate",我可以在 accumulator-server.py 屏幕上看到事件消息。

4

1 回答 1

0

您使用 accumulator-server.py 在本地(即在运行 Orion 的同一主机中)获得通知这一事实意味着 Orion 可以正常发送通知。因此,在某种意义上,问题可能与网络有关。

确保从运行 Orion 的主机到接收通知的 iOS 设备(特别是到端口 1028)之间存在网络连接,并且没有防火墙(在 iOS 设备上运行或在某些中间网络元素中运行)将流量过滤掉。您可以使用例如telnet来自运行 CB 的主机的命令来检查网络连接:

telnet myipaddress 1028
于 2015-01-12T12:29:33.367 回答