diff options
Diffstat (limited to 'ephraim.erl')
-rw-r--r-- | ephraim.erl | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ephraim.erl b/ephraim.erl new file mode 100644 index 0000000..0aff011 --- /dev/null +++ b/ephraim.erl @@ -0,0 +1,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. |