summaryrefslogtreecommitdiffstats
path: root/ephraim.erl
blob: 0aff0113b613c69564d9f8f49f3c30c0f95a7eb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
-module(ephraim).
-compile([debug_info, export_all]).

start() ->
    Pid = spawn(?MODULE, init, []),
    register(ephraim, Pid).

stop() ->
    ephraim ! stop.

init() ->
    Conn = spawn(ephraim_conn, init, []),
    loop(Conn).

loop(Conn) ->
    receive
	stop ->
	    Conn ! stop;
	Msg ->
	    io:format("ephraim: ~p~n", [Msg]),
	    loop(Conn)
    end.