Created
April 5, 2013 02:58
-
-
Save digitalextremist/5316264 to your computer and use it in GitHub Desktop.
Demonstrating same crash, except without subclass.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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