diff --git a/app/app/controllers/eventstream.rb b/app/app/controllers/eventstream.rb index 33b33a3..d997bfe 100644 --- a/app/app/controllers/eventstream.rb +++ b/app/app/controllers/eventstream.rb @@ -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 \ No newline at end of file