【文件属性】:
文件名称:em-apn:EventMachine的Apple Push通知
文件大小:20KB
文件格式:ZIP
更新时间:2021-05-16 05:11:01
Ruby
EM-APN-EventMachine的Apple Push通知
我们想要:
简化了持久连接用例
支持带有收据的增强型协议
用法
简而言之:
require "em-apn"
# Inside a reactor...
notification = EM::APN::Notification.new(token, :alert => alert)
client = EM::APN::Client.connect
client.deliver(notification)
使用此接口,配置连接的最简单方法是设置一些环境变量,以便EM :: APN可以找到您的SSL证书:
ENV["APN_KEY"] = "/path/to/key.pem"
ENV["APN_CERT"] = "/path/to/cert.pem"
另外,默认情况下,该库连接到Apple的沙盒推送服务器。 如果要连
【文件预览】:
em-apn-master
----.gitignore(52B)
----.rspec(8B)
----LICENSE(1KB)
----em-apn.gemspec(793B)
----certs()
--------.gitignore(0B)
----spec()
--------support()
--------extensions()
--------spec_helper.rb(339B)
--------em-apn()
----README.md(3KB)
----script()
--------server(500B)
--------push(741B)
--------test(1KB)
----lib()
--------em-apn.rb(526B)
--------extensions()
--------em-apn()
----Gemfile(90B)
----Rakefile(183B)