README.md in hara-0.1.0 vs README.md in hara-0.2.0

- old
+ new

@@ -1,12 +1,18 @@ # Hara [![Gem Version](https://badge.fury.io/rb/hara.png)](http://badge.fury.io/rb/hara) [![Build Status](https://travis-ci.org/jjyr/hara.png?branch=master)](https://travis-ci.org/jjyr/hara) -Hara is a simple framework, help you build websocket server. +Hara is a simple framework, help you build async & concurrent websocket server. +Hara's async ability from [em-websocket](https://github.com/igrigorik/em-websocket), + +Hara's concurrent ability from [celluloid](https://github.com/celluloid/celluloid). + +Yes, hara just a combination of them, eventmachine and celluloid work well together :) + ## Notice!! Current API is unstable, you should lock the version. ## Installation @@ -30,19 +36,21 @@ #test.rb require 'hara' class Echo < Hara::App define_action :echo do |str| - socket << str + socket.send str end end ``` *client* ```javascript var msg = JSON.stringify({action: 'echo',args:['hello world']}) var ws = new WebSocket('ws://localhost:3210') -ws.onmessage = function(msg){console.log(msg.data)} +ws.onmessage = function(msg){alert(msg.data)} + +//after a while ws.send(msg) //hello world ``` *start server*