Merge branch 'jonte_rewrite' into rewrite
Conflicts: src/ggs_coordinator.erl src/ggs_dispatcher.erl src/ggs_player.erl
This commit is contained in:
commit
c63e243564
3 changed files with 11 additions and 2 deletions
|
@ -30,13 +30,17 @@ get_token(_Player) ->
|
|||
%% @doc Properly terminates the player process. The player token will be destroyed.
|
||||
%% Makes table token unreferenced and destroys the process in the end.
|
||||
%% @spec stop(Table::pid()) -> Reason::string()
|
||||
stop(Table) ->
|
||||
stop(_Table) ->
|
||||
helpers:not_implemented().
|
||||
|
||||
|
||||
%% Internals
|
||||
|
||||
loop(Socket) ->
|
||||
% The socket is in 'active' mode, and that means we are pushed any data
|
||||
% that arrives on it, we do not need to recv() manually. Since the socket
|
||||
% was opened in our parent process, we need to change the owner of it to
|
||||
% us, otherwise these messages end up in our parent.
|
||||
erlang:port_connect(Socket, self()),
|
||||
receive {tcp, Socket, Data} -> % Just echo for now..
|
||||
gen_tcp:send(Socket,Data),
|
||||
loop(Socket)
|
||||
|
|
Reference in a new issue