Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: HAW-AI/VS-2012-WS-A1-PDTT
base: 65a2b1aee7
...
head fork: HAW-AI/VS-2012-WS-A1-PDTT
compare: 75d6885c6a
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 26 additions and 3 deletions.
  1. +20 −0 src/client.erl
  2. +6 −3 src/server.erl
View
20 src/client.erl
@@ -0,0 +1,20 @@
+-module(client).
+-import(werkzeug, [get_config_value/2,logging/2,timeMilliSecond/0,delete_last/1]).
+
+-compile([export_all]).
+
+start(ServerPID) ->
+ ClientPID = spawn(fun() -> loop(redakteur, ServerPID) end),
+ ClientPID.
+
+redakteur() ->
+ ok.
+
+
+leser() ->
+ ok.
+
+loop(ClientType, ServerPID) ->
+ ServerPID ! {foo},
+ erlang:sleep(5000),
+ loop(ClientType, ServerPID).
View
9 src/server.erl
@@ -7,9 +7,12 @@
start() ->
{ok, Config} = file:consult("../server.cfg"),
- Server = spawn(fun() -> loop(_State = #state{config=Config}) end),
- logging("server.log", io_lib:format("Server Startzeit: ~p mit PID ~p ~n", [timeMilliSecond(), Server])),
- Server.
+ State = #state{config=Config},
+ ServerPID = spawn(fun() -> loop(State) end),
+ {ok, ServerName} = orddict:find(servername, State#state.config),
+ register(ServerName, ServerPID),
+ logging("server.log", io_lib:format("Server Startzeit: ~p mit PID ~p ~n", [timeMilliSecond(), ServerPID])),
+ ServerPID.
loop(State) ->
{ok, Lifetime} = orddict:find(lifetime, State#state.config),

No commit comments for this range

Something went wrong with that request. Please try again.