aboutsummaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorJakob Pfender <jpfender@zedat.fu-berlin.de>2010-10-15 10:18:15 +0200
committerJakob Pfender <jpfender@zedat.fu-berlin.de>2010-10-15 10:18:15 +0200
commite64206c54ce24d2346215c61cc7997b2009e446e (patch)
treedd04365552f58fb4a8d55d7999a02fa35f11f03a /client
parent69966f8f6d58c18486fbfef66ed2e6f48d2de469 (diff)
downloaderlang-e64206c54ce24d2346215c61cc7997b2009e446e.tar.gz
erlang-e64206c54ce24d2346215c61cc7997b2009e446e.tar.xz
erlang-e64206c54ce24d2346215c61cc7997b2009e446e.zip
documentation for client and server
Diffstat (limited to 'client')
-rw-r--r--client/client.erl7
1 files changed, 5 insertions, 2 deletions
diff --git a/client/client.erl b/client/client.erl
index f500fe1..b72b5ee 100644
--- a/client/client.erl
+++ b/client/client.erl
@@ -2,8 +2,8 @@
-export([register/2, register/3, login/3, list/0, handle/2, getVotes/0, vote/2, devote/2]).
checkLogin(Value) ->
- %% check if user meets the requirements to be locked in or not by
- %% locking in to the registered processes and check if the cli
+ %% check if user meets the requirements to be logged in or not by
+ %% logging in to the registered processes and checking if the cli
%% process is registered
LoggedIn = lists:member(cli, registered()),
if LoggedIn == Value ->
@@ -35,6 +35,7 @@ register(Name, Password) ->
{error, not_logged_in}
end.
+%register the client with the server
register(Server, Name, Password) ->
try checkLogin(false) of
_ ->
@@ -45,6 +46,7 @@ register(Server, Name, Password) ->
end,
wait_for_reply().
+%login to the server
login(Server, Name, Password) ->
code:purge(server),
code:load_abs("../common/server"),
@@ -68,6 +70,7 @@ login(Server, Name, Password) ->
{error, logged_in}
end.
+%request the playlist from the server
list() ->
try checkLogin(true) of
_ ->