Sha256: 81afbe998fc9f4cd1dda842fbcb14af5e3e034297e6049973ba8f742ad1c669d
Contents?: true
Size: 625 Bytes
Versions: 2
Compression:
Stored size: 625 Bytes
Contents
= EM-WebSocket EventMachine based WebSocket server -- highly experimental, at this point, at least. - http://www.igvita.com/2009/12/22/ruby-websockets-tcp-for-the-browser/ == Simple server example EventMachine.run { EventMachine::WebSocket.start(:host => "0.0.0.0", :port => 8080) do |ws| ws.onopen { puts "WebSocket connection open" # publish message to the client ws.send "Hello Client" } ws.onclose { puts "Connection closed" } ws.onmessage { |msg| puts "Recieved message: #{msg}" ws.send "Pong: #{msg}" } end }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
em-websocket-0.0.4 | README.rdoc |
em-websocket-0.0.2 | README.rdoc |