Skip to content

Commit

Permalink
Resolved issue YACS-RCOS#7 & YACS-RCOS#8, but need to format JSON output
Browse files Browse the repository at this point in the history
  • Loading branch information
bdieu178 committed Jul 25, 2018
1 parent 2c84367 commit a0f109c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions app/app/controllers/eventstream.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,22 @@
require 'json'

class EventStream
#@auto_dispatch = true
@auto_dispatch = true

def on_open
puts 'Opened the YACS-EventStream Websocket!'
end

#def on_message data
def notify(data)
@event = data
puts data
#event = {:notifications => data }
#puts event.to_json # need to figure out this shit
end

#send data to websocket
def send_data
write @event
end

def on_close
end
end
#Plezi.route '/notifications', EventStream
#ip address 172.19.0.9:9094

0 comments on commit a0f109c

Please sign in to comment.