Skip to content

Instantly share code, notes, and snippets.

@anand9
Last active December 14, 2015 01:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anand9/5008140 to your computer and use it in GitHub Desktop.
Save anand9/5008140 to your computer and use it in GitHub Desktop.
receives push messages
require 'eventmachine'
require 'faye'
EM.run {
client = Faye::Client.new('http://0.0.0.0:9292/faye')
client.subscribe('/anand9_calendar') do |message| | #a unique id is used as the channel name like calendar id
puts message.inspect
end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment