Граф коммитов

250 Коммитов

Автор SHA1 Сообщение Дата
Andrew Naylor 412647a1db 1.4.3 2013-11-18 23:19:02 +00:00
Andrew Naylor 2d35058720 Added a short delay to each socket close to ensure error responses from Apple aren't missed.
500ms is probably sufficient but increased to 2500 for added certainty.
2013-11-18 23:18:29 +00:00
Andrew Naylor 08a26e0160 Added doc for shutdown method. 2013-11-18 23:06:33 +00:00
Andrew Naylor 38c0800514 Improved connection shutdown behaviour.
Closes #134
2013-11-18 23:05:37 +00:00
ejc3@yahoo-inc.com ebcb0c92e9 Update connection.js to support a "shutdown" command
This change adds a shutdown method that indicates to socketDrained that it should close connections once there are no more notifications to send. The side effect is that the node process will end. I've tested the change both with all successful messages, as well as when a few messages can't be sent. In both cases, the program does not shutdown until all messages that can be successfully sent our sent.

Signed-off-by: Andrew Naylor <argon@mkbot.net>
2013-11-18 21:59:21 +00:00
Andrew Naylor 3a3163d27b Fixes #133: Token length should not be treated as fixed. 2013-11-18 21:27:21 +00:00
Andrew Naylor 3089bb5a44 v1.4.2 2013-10-19 12:30:38 +01:00
Andrew Naylor 1bba8db41f Renamed the `gateway` config parameter to `address`
There has been some confusion around the parameter naming between the Notification and the Feedback side of the module. The `gateway` parameter has been replaced with `address`. Backwards compatibility remains with the `gateway`  parameter which will take precedence if present.
2013-10-19 12:26:35 +01:00
Andrew Naylor a374885c7b Tidied up docs for notification parameters 2013-10-19 12:26:22 +01:00
Chad Scira 38d2256360 'url-args' is required for safari website notifications 2013-10-19 12:09:08 +01:00
Andrew Naylor 419027a18b 1.4.1 2013-10-01 08:52:52 +01:00
Andrew Naylor 190b01029a Typo 2013-10-01 08:52:35 +01:00
Andrew Naylor 25b15e0e03 v.1.4.0 2013-09-30 22:39:15 +01:00
Andrew Naylor 61212de616 Copyright fix. 2013-09-30 22:37:50 +01:00
goelvivek fa82c62c09 adding option parameter for setTruncateAtWordEnd 2013-09-30 22:36:37 +01:00
Andrew Naylor 3ea665c55c Typo 2013-09-30 20:54:26 +01:00
Andrew Naylor a38b29ef31 retryCountExceeded to retryLimitExceeded
- Roman Skvazh

Closes #124
2013-09-29 22:11:50 +01:00
Andrew Naylor 35c24aa2b9 Improved error documentation to include information about internal errors.
Fixes #123
2013-09-29 22:03:14 +01:00
Andrew Naylor 80cef4d3ec Lint. 2013-09-25 19:25:17 +01:00
Cheah Chu Yeow 711d683968 Fix docs and example for feedback service where "gateway" is incorrectly used - it should be "address". 2013-09-25 19:23:59 +01:00
Andrew Naylor 68de3b9661 Fixed connection for 0.11 and older versions
Fixes #122.

node-0.11 changes how TLS connections handle sockets when connecting.

Discovered in #65, it's necessary to attach the error handler before the socket establishes a connection. In some cases the socket errors before the TLS#connect method returns, so the error handler hasn't been attached yet and an exception is raised.
2013-09-25 19:17:45 +01:00
Andrew Naylor ef13e4446d New protocol format as-of iOS 7 docs.
Enable the old protocol by passing `legacy: true` to the connection initialiser.
2013-09-25 18:51:21 +01:00
Andrew Naylor 12a8c1417c Fix for node-0.11.x
Because of a change in TLS socket handling the connection to APNS would never be established under 0.11
2013-09-22 22:58:25 +01:00
Andrew Naylor 3e0f4ebc90 Added "contentAvailable" to Notification 2013-09-22 22:58:25 +01:00
Andrew Naylor 11377200e5 Merge pull request #115 from sandfox/patch-1
Minor examples tweak for friendlier output
2013-09-18 14:10:07 -07:00
James Butler f175c4ee25 update token string representation to be human friendly 2013-07-30 16:09:07 +01:00
James Butler c1e2073014 make string representation of token more human readable (and expected) 2013-07-30 16:05:47 +01:00
Andrew Naylor 7dc729db9d 1.3.8 2013-07-21 23:39:36 +01:00
Andrew Naylor 8096574a2b Raise an error with all notifications for module initialisation error. 2013-07-21 00:34:33 +01:00
Andrew Naylor 696e8dce6c Notifications have a configurable number of retries. 2013-07-21 00:32:42 +01:00
Andrew Naylor f47993e3a1 v1.3.7 2013-07-20 12:38:13 +01:00
Andrew Naylor 423850943f Updated docs to correct `batchFeedback` description.
Also fixed a missing URL link.
2013-07-20 12:36:24 +01:00
Andrew Naylor c690e752c0 Merge pull request #114 from hasankhan/master
Fire the feedback event even if there is no feedback, in batch mode.

Informative, to let the consumer know that the operation completed successfully without and feedback to process.
2013-07-20 04:26:06 -07:00
Hasan Khan d5e9484a72 Fire the feedback event even if there is no feedback to let the consumer know that operation completed without feedback. 2013-07-19 11:17:31 -07:00
Andrew Naylor 5175a34ec4 1.3.6 2013-07-11 20:42:17 +01:00
Andrew Naylor 91230c1466 Changelog 2013-07-11 20:42:12 +01:00
Andrew Naylor 3fb447b2e5 Resend a notification if error occurs during transmission
If the socket is "busy", i.e. hasn't drained, when an error occurs then we prepare the last notification to be resent. This should address issue #100. There's no way to stop the timeouts, but this should make the behaviour more consistent.
2013-07-11 20:39:34 +01:00
Andrew Naylor 7d25b16026 Fixes #90 - Added some more error checking for invalid device tokens.
Specifically when a Device object is not successfully initialised it should throw an error and this is caught and raises an error appropriately.
2013-07-11 20:33:25 +01:00
Andrew Naylor d6b7720cf1 v1.3.5 2013-07-01 01:48:49 +01:00
Andrew Naylor b7e9fec501 Added some initial examples. 2013-07-01 01:48:49 +01:00
Andrew Naylor ba30c8f07a New Notification configuration methods and they're now chain able. 2013-07-01 01:48:49 +01:00
Andrew Naylor 0cf06aa40e setCacheLength method. 2013-07-01 01:48:49 +01:00
Andrew Naylor e81cf5b7bc Improved doc.
Added links to Google group and moved some doc to more sensible places, out of read me.
2013-07-01 01:48:49 +01:00
Andrew Naylor 59ec4ba9cf Fixed feedback error handling.
Only emit `error` in the event of an unrecoverable error (Being unable to load certificates/keys from disk) In other instances emit `feedbackError`
2013-07-01 01:44:49 +01:00
Andrew Naylor 9ad22df77a Lint. 2013-07-01 01:44:49 +01:00
Andrew Naylor b5dc6aa98e Minor logic defect in error handling. 2013-07-01 01:44:49 +01:00
Andrew Naylor 87b6de7826 Merge pull request #105 from steveluscher/patch-1
Updated link to the payload documentation
2013-06-29 04:45:13 -07:00
Steven Luscher 18c4d3d4dd Updated link to the payload documentation 2013-06-10 00:00:28 -06:00
Andrew Naylor 9d46022b69 1.3.4 2013-05-25 13:05:28 +01:00
Andrew Naylor cdeb522064 Ignore an EPIPE thrown after a transmission error.
This is a harmless error and nothing seems to suppress it, so we'll ignore it in the right circumstances.
2013-05-25 13:03:04 +01:00