Added support of the enhanced notification format#21
Added support of the enhanced notification format#21adamrimon wants to merge 3 commits intodjacobs:masterfrom
Conversation
|
Awesome, I was considering writing this myself so I'm glad I checked the open pull requests first! |
|
no problem ;-)
|
There was a problem hiding this comment.
From what I can read, Apple will not send anything back when the push message is accepted. Thus, we will block here indefinitely. Seems consistent with what I'm seeing as well.
There was a problem hiding this comment.
You are right. We should set the socket to non-blocking mode, or with a very short timeout.
There was a problem hiding this comment.
I believe the API should be asynchronous here. I'm not confortable with either waiting for a short timeout period or setting the socket to non-blocking mode. In either case you may end up getting an exception for the wrong notification. IMHO the appropriate solution would be to have a separate thread/process read from the socket (in blocking mode, if necessary forever) and execute a callback function when an error response is read.
|
I think this was obsoleted by #71 and can be closed? |
The Apple Push Notification Service has an "enhanced notification format".
When this format is used, the gateway server responses with a detailed error instead of just ignoring the request.
This commit adds support for this feature, which includes raising exceptions depended on the server response.