sajidhalai / javapns

Automatically exported from code.google.com/p/javapns
0 stars 0 forks source link

Push alert - Latency #127

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is not a problem, but I was just checking the latency in calling a 
push.alert(). It looks like there is a 6 seconds lag until the method returns. 
Is this normal? Is there way 

What steps will reproduce the problem?
1. Any push.alert, badge or sound() calls.

What do you see?
6 seconds method return turnaround time.

What version of the product are you using? On what operating system?
mac os x, latest stable release.

Please provide any additional information below.
Just checking if notifications can be sent faster.

Thanks

Original issue reported on code.google.com by rejahan...@gmail.com on 14 Jun 2012 at 9:31

GoogleCodeExporter commented 9 years ago
The delay is normal, to allow the service to return error-response packets (if 
any).  The amount of time the library waits for error-response packets was 
carefully tuned after numerous APNS behavior tests.

If you have multiple notifications to send however, you should NOT be pushing 
each one individually (which I'm assuming you are doing since the delay is a 
problem for you).  Refer to the documentation on how to push multiple 
notifications without opening-waiting-closing connections all the time...

Original comment by sype...@gmail.com on 2 Jul 2012 at 10:32