summaryrefslogtreecommitdiff
path: root/mess_interface.hrl
blob: 56d82d5769bb456f7902272fc03535cad3981561 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
%%% Message interface between client and server and client shell for
%%% messenger program

%%% Messages from Client to server received in server/1 function.
-record(logon, {client_pid, username}).
-record(message, {client_pid, to_name, message}).
%%% {'EXIT', ClientPid, Reason} (client terminated ro unrechable.)

%%% Messages from Server to Client, received in await_result/0 function
-record(abort_client, {message}).
%%% Messages are:	user_exists_at_other_node,
%%% 			you_are_not_logged_on
-record(server_reply, {message}).
%%% Messages are:	logged_on,
%%% 			receiver_not_found,
%%% 			sent (Message has been sent (no garantee)

%%% Messages from Server to Client received in client/1 function
-record(message_from, {from_name, message}).

%%% Messages from shell to Client received in client/1 function
%%% spawn(mess_client, client, [server_node(), Name])
-record(message_to, {to_name, message}).
%%% logoff