README.md in sinatra-websocketio-0.1.6 vs README.md in sinatra-websocketio-0.1.7

- old
+ new

@@ -64,11 +64,13 @@ ### Client --(WebSocket)--> Server Client Side ```javascript -io.push("chat", {name: "shokai", message: "hello"}); // client -> server +io.on("connect", function{ + io.push("chat", {name: "shokai", message: "hello"}); // client -> server +}); ``` Server Side ```ruby @@ -95,9 +97,10 @@ Server Side ```ruby io.on :connect do |session| puts "new client <#{session}>" + io.push :hello, "hello!!" end io.on :disconnect do |session| puts "client disconnected <#{session}>" end