vendor/assets/server/atome_server_wasm.rb in atome-0.5.6.1.1 vs vendor/assets/server/atome_server_wasm.rb in atome-0.5.6.1.4
- old
+ new
@@ -77,21 +77,21 @@
puts "Item count: #{items.count}"
puts "The average price is: #{items.avg(:width)}"
- index_content = File.read("../src/index_server.html")
+ index_content = File.read("../src/index_server_wasm.html")
opts[:root] = '../src'
plugin :static, %w[/css /js /medias], root: '../src'
route do |r|
r.root do
if Faye::WebSocket.websocket?(r.env)
ws = Faye::WebSocket.new(r.env)
ws.on :open do |event|
ws.send('server ready'.to_json)
- ws.send('asking for synchro data'.to_json)
+ # ws.send('asking for synchro data'.to_json)
end
ws.on(:message) do |event|
#TODO : encode event on both client and server
ws.send(event.data.reverse.to_json) # Envoie le message inversé au client