Skip to content

Commit

Permalink
README: update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
meh committed May 24, 2016
1 parent 2464e25 commit 5cd1f60
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions README.md
Expand Up @@ -46,7 +46,7 @@ Simple example
--------------
```elixir
defmodule Echo do
use Reagent.Behaviour
use Reagent

def handle(conn) do
case conn |> Socket.Stream.recv! do
Expand All @@ -70,13 +70,13 @@ Complex example
---------------
```elixir
defmodule Echo do
use Reagent.Behaviour
use Reagent

def start(connection) do
:gen_server.start __MODULE__, connection, []
GenServer.start __MODULE__, connection, []
end

use GenServer.Behaviour
use GenServer

def init(connection) do
{ :ok, connection }
Expand All @@ -97,8 +97,8 @@ defmodule Echo do
{ :noreply, connection }
end

def handle_info({ :tcp_closed, _ }, _connection) do
{ :stop, :normal, _connection }
def handle_info({ :tcp_closed, _ }, connection) do
{ :stop, :normal, connection }
end
end
```
Expand Down
2 changes: 1 addition & 1 deletion examples/echo.ex
@@ -1,5 +1,5 @@
defmodule Echo do
use Reagent.Behaviour
use Reagent

def handle(conn) do
case conn |> Socket.Stream.recv! do
Expand Down

0 comments on commit 5cd1f60

Please sign in to comment.