【文件属性】:
文件名称:celluloid-eventsource:服务器发送事件的赛璐oid实现
文件大小:13KB
文件格式:ZIP
更新时间:2021-05-02 05:25:13
Ruby
赛璐oid ::事件源
基于Celluloid :: IO的EventSource客户端。
基于规范
安装
将此行添加到应用程序的Gemfile中:
gem 'celluloid-eventsource'
然后执行:
$ bundle
或将其自己安装为:
$ gem install celluloid-eventsource
然后在您的项目中的某处:
require 'celluloid/eventsource'
用法
初始化一个新的Celluloid::EventSource对象将创建连接:
es = Celluloid :: EventSource . new ( "http://example.com/" )
可以在诸如on_open , on_message和on_error事件上接收消息。
这些可以在初始化时分配
es = Celluloid :: EventS
【文件预览】:
celluloid-eventsource-master
----.travis.yml(93B)
----log()
--------.gitignore(6B)
----Rakefile(116B)
----LICENSE(1KB)
----Gemfile(106B)
----.rspec(8B)
----spec()
--------support()
--------celluloid()
--------spec_helper.rb(645B)
----.gitignore(197B)
----lib()
--------celluloid()
----celluloid-eventsource.gemspec(1KB)
----README.md(2KB)