Sha256: 5dabefd79acf1c64a4ebc7c102b14be53778a3ab4a297d13d8a79d13afff1acd
Contents?: true
Size: 303 Bytes
Versions: 7
Compression:
Stored size: 303 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" } ws.onerror { |e| puts "Error: #{e.message}" } end
Version data entries
7 entries across 7 versions & 2 rubygems