Add websocket_server sample

This commit is contained in:
Sdogruyol 2015-12-16 20:36:41 +02:00
parent c005bae101
commit 5fa399de2c
1 changed files with 9 additions and 0 deletions

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