Skip to content

Instantly share code, notes, and snippets.

@digitalextremist
Created April 5, 2013 02:58
Show Gist options
  • Save digitalextremist/5316264 to your computer and use it in GitHub Desktop.
Save digitalextremist/5316264 to your computer and use it in GitHub Desktop.
Demonstrating same crash, except without subclass.
require 'rubygems'
require 'bundler/setup'
require 'reel'
puts "Starting test server //"
Reel::Server.supervise("0.0.0.0", 80) do |connection|
while request = connection.request
case request
when Reel::Request
puts "Client requested: #{request.method} #{request.url}"
request.respond :ok, "Hello, world!"
when Reel::WebSocket
puts "Client made a WebSocket request to: #{request.url}"
request << "Hello everyone out there in WebSocket land"
request.close
break
end
end
end
sleep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment