gpt4 book ai didi

iphone - 向 APNS 批量发送消息,如果其中一些出现错误怎么办?

转载 作者:可可西里 更新时间:2023-11-01 03:55:19 24 4
gpt4 key购买 nike

假设我有 3 个通知要发送 - abc - 但是通知 b 有问题。让我们假设它是一个无效的 token 。如果我执行以下操作:

  1. 创建缓冲区
  2. 将a、b、c添加到缓冲区
  3. 发送缓冲区到 APNS 服务器

是否会发送消息c

Apple 文档说:

If you send a notification and APNs finds the notification malformed or otherwise unintelligible, it returns an error-response packet prior to disconnecting.

这是否意味着我会收到关于 b 的错误并且连接会被断开,因此永远不会发送 c

最佳答案

消息 c 永远不会被发送。如果您设法收到消息 b 的错误响应,则必须重新发送发送 b 之后和收到响应之前发送的所有消息。

你可以在这里阅读一篇关于它的好文章:The Problem with APNS

关于iphone - 向 APNS 批量发送消息,如果其中一些出现错误怎么办?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10848970/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com