Open pjebs opened 9 years ago
I guess what I'm trying to say is how cam I satisfy this recommendation from Apple:
You may establish multiple connections to the same gateway or to multiple gateway instances. If you need to send a large number of remote notifications, spread them out over connections to several different gateways. This improves performance compared to using a single connection: it lets you send the remote notifications faster, and it lets APNs deliver them faster.
Keep your connections with APNs open across multiple notifications; don’t repeatedly open and close connections. APNs treats rapid connection and disconnection as a denial-of-service attack. You should leave a connection open unless you know it will be idle for an extended period of time—for example, if you only send notifications to your users once a day it is ok to use a new connection each day.
The binary interface employs a plain TCP socket for binary content that is streaming in nature. For optimum performance, batch multiple notifications in a single transmission over the interface, either explicitly or using a TCP/IP Nagle algorithm. The format of notifications is shown in Figure 5-1.
+1 Can this lib send only one push through one connection?
+1 for sending many push notification in one connection.
how one connection sending many?
According to Apple Docs, they want you to send as many push notifications using the one connection. The documentation states that you can actually send the data to each push notification next to each other instead one at a time.
In fact the docs state that if you send many push notifications separately, it may interpret it as a DoS attack.
Is there any way to do this using your package?