djacobs / PyAPNs

Python library for interacting with the Apple Push Notification service (APNs)
http://pypi.python.org/pypi/apns/
MIT License
1.22k stars 374 forks source link

send_notifications identifier #168

Open zhaosir opened 8 years ago

zhaosir commented 8 years ago

identifier = random.getrandbits(32) Will appear repeat?

zhaosir commented 8 years ago

What happens if identifier is equal to 0

farridav commented 8 years ago

i needs to fit within 32 bits, random.getrandbits(32) will avoid collisions, if you sent two with 0, then you wouldn't know which one you were receiving in the response_handler, nor would the enhanced notification be able to retry...