summaryrefslogtreecommitdiff
path: root/src/mochiweb/mochiweb_echo.erl
diff options
context:
space:
mode:
authorAdam Kocoloski <adam@cloudant.com>2010-08-11 15:52:06 -0400
committerAdam Kocoloski <adam@cloudant.com>2010-08-11 17:39:38 -0400
commit498d5c85681ddfea577377b8e10051fb445ac0c2 (patch)
tree10c4d32773d703374d000f7dc0ae3988f6926366 /src/mochiweb/mochiweb_echo.erl
parent7e67565d2241783b5f24a37400ddae83b00c7a81 (diff)
move mochiweb to rebar layout
Diffstat (limited to 'src/mochiweb/mochiweb_echo.erl')
-rw-r--r--src/mochiweb/mochiweb_echo.erl31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/mochiweb/mochiweb_echo.erl b/src/mochiweb/mochiweb_echo.erl
deleted file mode 100644
index f32d6803..00000000
--- a/src/mochiweb/mochiweb_echo.erl
+++ /dev/null
@@ -1,31 +0,0 @@
-%% @author Bob Ippolito <bob@mochimedia.com>
-%% @copyright 2007 Mochi Media, Inc.
-
-%% @doc Simple and stupid echo server to demo mochiweb_socket_server.
-
--module(mochiweb_echo).
--author('bob@mochimedia.com').
--export([start/0, stop/0, loop/1]).
-
-stop() ->
- mochiweb_socket_server:stop(?MODULE).
-
-start() ->
- mochiweb_socket_server:start([{name, ?MODULE},
- {port, 6789},
- {ip, "127.0.0.1"},
- {max, 1},
- {loop, {?MODULE, loop}}]).
-
-loop(Socket) ->
- case gen_tcp:recv(Socket, 0, 30000) of
- {ok, Data} ->
- case gen_tcp:send(Socket, Data) of
- ok ->
- loop(Socket);
- _ ->
- exit(normal)
- end;
- _Other ->
- exit(normal)
- end.