README.md in reel-0.3.0 vs README.md in reel-0.4.0.pre

- old
+ new

@@ -1,11 +1,15 @@ ![Reel](https://github.com/celluloid/reel/raw/master/logo.png) ======= +[![Gem Version](https://badge.fury.io/rb/reel.png)](http://rubygems.org/gems/reel) [![Build Status](https://secure.travis-ci.org/celluloid/reel.png?branch=master)](http://travis-ci.org/celluloid/reel) [![Dependency Status](https://gemnasium.com/celluloid/reel.png)](https://gemnasium.com/celluloid/reel) -[![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/celluloid/reel) +[![Code Climate](https://codeclimate.com/github/celluloid/reel.png)](https://codeclimate.com/github/celluloid/reel) +[![Coverage Status](https://coveralls.io/repos/celluloid/reel/badge.png?branch=master)](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 ```