Sha256: 69a54891434ce5e7c44663e8818e97cb1db13415e2bd0302e3221945e8b92ec5
Contents?: true
Size: 559 Bytes
Versions: 1
Compression:
Stored size: 559 Bytes
Contents
# Usage: $ EVENTFLIT_KEY=YOURKEY ruby examples/subscribe_private.rb $:.unshift(File.expand_path("../../lib", __FILE__)) require 'eventflit-client' require 'pp' APP_KEY = ENV['EVENTFLIT_KEY'] # || "YOUR_APPLICATION_KEY" APP_SECRET = ENV['EVENTFLIT_SECRET'] # || "YOUR_APPLICATION_SECRET" socket = EventflitClient::Socket.new(APP_KEY, { :encrypted => true, :secret => APP_SECRET } ) # Subscribe to a channel socket.subscribe('private-helloeventflit') # Bind to a channel event socket['helloeventflit'].bind('hello') do |data| pp data end socket.connect
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
eventflit-client-0.1.0 | examples/subscribe_private.rb |