APNS::Agent - agent server for APNS
use APNS::Agent; my $agent = APNS::Agent->new( certificate => '/path/to/certificate', private_key => '/path/to/private_key', ); $agent->run;
APNS::Agent is agent server for APNS. It is also backend class of apns-agent.
This module provides consistent connection to APNS and cares reconnection. It utilizes AnyEvent::APNS internally.
THE SOFTWARE IS ALPHA QUALITY. API MAY CHANGE WITHOUT NOTICE.
APNS::Agent launches HTTP Server process which accepts only POST method and
application/x-www-form-urlencoded format parameters.
Acceptable parameters as follows:
device token by HEX format. (Required)
JSON string for push notification. If you only want to send message, alternatively can use
alertmust be supplied. Both of
alertare specified, the
payloadparameter has priority.
push notification message.
Thank @shin1rosei that many code of this module is taken from https://github.com/shin1rosei/AnyEvent-APNS-Server.
Copyright (C) Songmu.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.