Sha256: 428754f41a01075ed21f5dadf4f4dea91a7bd777734c712753c5a6fd14e56d85

Contents?: true

Size: 253 Bytes

Versions: 9

Compression:

Stored size: 253 Bytes

Contents

require 'lib/em-websocket'

EventMachine::WebSocket.start(:host => "0.0.0.0", :port => 8080, :debug => true) do |ws|
  ws.onopen    { ws.send "Hello Client!"}
  ws.onmessage { |msg| ws.send "Pong: #{msg}" }
  ws.onclose   { puts "WebSocket closed" }
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
em-websocket-0.2.0 examples/echo.rb
em-websocket-0.1.4 examples/echo.rb
em-websocket-0.1.3 examples/echo.rb
em-websocket-0.1.2 examples/echo.rb
em-websocket-0.1.1 examples/echo.rb
em-websocket-0.0.6 examples/echo.rb
em-websocket-0.0.5 examples/echo.rb
em-websocket-0.0.4 examples/echo.rb
em-websocket-0.0.2 examples/echo.rb