Add websocket_server sample

This commit is contained in:
Sdogruyol 2015-12-16 20:36:41 +02:00
parent c005bae101
commit 5fa399de2c

View file

@ -0,0 +1,9 @@
require "kemal"
ws "/" do |socket|
socket.send "Hello from Kemal!"
socket.on_message do |message|
socket.send "Echo back from server #{message}"
end
end