README.md in reel-0.3.0 vs README.md in reel-0.4.0.pre
- old
+ new
@@ -1,11 +1,15 @@

=======
+[](http://rubygems.org/gems/reel)
[](http://travis-ci.org/celluloid/reel)
[](https://gemnasium.com/celluloid/reel)
-[](https://codeclimate.com/github/celluloid/reel)
+[](https://codeclimate.com/github/celluloid/reel)
+[](https://coveralls.io/r/celluloid/reel)
+> "A dizzying lifetime... Reeling by on Celluloid" _-- Rush / Between The Wheels_
+
Reel is a fast, non-blocking "evented" web server built on [http_parser.rb][parser],
[websocket_parser][websockets], [Celluloid::IO][celluloidio], and [nio4r][nio4r]. Thanks
to Celluloid, Reel also works great for multithreaded applications and provides
traditional multithreaded blocking I/O support too.
@@ -81,10 +85,12 @@
request.close
break
end
end
end
+
+sleep
```
When we read a request from the incoming connection, we'll either get back
a Reel::Request object, indicating a normal HTTP connection, or a
Reel::WebSocket object for WebSockets connections.
@@ -164,9 +170,15 @@
app.configure do |config|
config.ip = MYAPP_IP
config.port = MYAPP_PORT
config.adapter = :Reel
+
+ # Optional: (WM master only) handler for incoming websockets
+ config.adapter_options[:websocket_handler] = proc do |websocket|
+ # socket is a Reel::WebSocket
+ socket << "hello, world"
+ end
end
end
MyApp.run
```