source: trunk/dsa_messenger/server-logon_manager.adb

Last change on this file was 14, checked in by vadim.godunko, 12 years ago

Add handling of failed logon procedure.

File size: 847 bytes
Line 
1with Ada.Text_IO;
2
3with Server.Bus;
4
5package body Server.Logon_Manager is
6
7 -----------
8 -- Logon --
9 -----------
10
11 procedure Logon
12 (Name : String;
13 Password : String;
14 Client : Messenger.Client_Sessions.Client_Session_Access) is
15 begin
16 Ada.Text_IO.Put
17 ("Login: user '" & Name & "', password: '" & Password & "'");
18 Server.Bus.Register (Name, Client);
19 Ada.Text_IO.New_Line;
20
21 exception
22 when others =>
23 Ada.Text_IO.Put_Line ("; logon failed");
24
25 raise;
26 end Logon;
27
28 ----------
29 -- Send --
30 ----------
31
32 procedure Send (From : String; To : String; Text : String) is
33 begin
34 Ada.Text_IO.Put_Line
35 ("Message: from '" & From & "', to '" & To & "', text '" & Text & "'");
36 Server.Bus.Send (From, To, Text);
37 end Send;
38
39end Server.Logon_Manager;
Note: See TracBrowser for help on using the repository browser.