diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2010-10-14 15:23:22 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2010-10-14 15:23:22 +0200 |
commit | 097d7f7dda9c405fb796e3228631a07192f36bd1 (patch) | |
tree | a8a4fca05fc0329cf2183522dfd4a4f33889ca79 | |
parent | 84937b0728ae3aac1174b32c85df17cf8bf627a5 (diff) | |
download | erlang-097d7f7dda9c405fb796e3228631a07192f36bd1.tar.gz erlang-097d7f7dda9c405fb796e3228631a07192f36bd1.tar.xz erlang-097d7f7dda9c405fb796e3228631a07192f36bd1.zip |
added comments
-rw-r--r-- | server/dispatcher.erl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/server/dispatcher.erl b/server/dispatcher.erl index 882bed3..e5e0572 100644 --- a/server/dispatcher.erl +++ b/server/dispatcher.erl @@ -2,9 +2,12 @@ -export([start/0, init/0, handle/2]). start() -> + %% load server module from common directory, + %% used form server and client code:purge(server), code:load_abs("../common/server"), + %% spawn media backend in seperat process try spawn(media, init, []) of _ -> io:format("Media-Backend started!~n") @@ -14,6 +17,9 @@ start() -> exit(1) end, + %% start server (registered as dis) + %% server-module will call handle if message arrives and init to + %% initialize the status try server:start(dis, dispatcher) of true -> io:format("Server started!~n"), @@ -53,4 +59,5 @@ handle({'EXIT', _, _}, Dict) -> Dict; handle(Cmd, Dict) -> + %% standard command, to find transmission errors {{error, {unknown_command, Cmd}}, Dict}. |