aboutsummaryrefslogtreecommitdiffstats
path: root/examples/tcp_echo/src/echo_protocol.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-12-07 14:08:25 +0100
committerLoïc Hoguin <[email protected]>2013-12-07 14:08:25 +0100
commit0770e2893f88cd50020a621e4d3b813ff8e6c58f (patch)
treedb8086ef3b68ea205f69b7582334e579ff2dd907 /examples/tcp_echo/src/echo_protocol.erl
parentb0c37e853ef0600ca5b86216e427d767b6bc6126 (diff)
downloadranch-0770e2893f88cd50020a621e4d3b813ff8e6c58f.tar.gz
ranch-0770e2893f88cd50020a621e4d3b813ff8e6c58f.tar.bz2
ranch-0770e2893f88cd50020a621e4d3b813ff8e6c58f.zip
Fix small issues and style of the examples
Diffstat (limited to 'examples/tcp_echo/src/echo_protocol.erl')
-rw-r--r--examples/tcp_echo/src/echo_protocol.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/tcp_echo/src/echo_protocol.erl b/examples/tcp_echo/src/echo_protocol.erl
index 85ea289..5ed79b3 100644
--- a/examples/tcp_echo/src/echo_protocol.erl
+++ b/examples/tcp_echo/src/echo_protocol.erl
@@ -1,7 +1,10 @@
%% Feel free to use, reuse and abuse the code in this file.
-module(echo_protocol).
--export([start_link/4, init/4]).
+-behaviour(ranch_protocol).
+
+-export([start_link/4]).
+-export([init/4]).
start_link(Ref, Socket, Transport, Opts) ->
Pid = spawn_link(?MODULE, init, [Ref, Socket, Transport, Opts]),