|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 10240 (0x2800)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Objet_Serveur, seg_057349
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
with Message;
with Orb_Tools;
with Text_Io;
with Transport_Defs;
with Transport;
with Identification;
with Byte_Defs;
procedure Objet_Serveur is
My_Mess : Message.Tmessage;
My_Content : Orb_Tools.Content_String;
My_Command : Message.Command_Type;
My_Id : Identification.Tclient_Id := 0;
My_Host : Orb_Tools.Host_String;
My_Socket : Orb_Tools.Socket_String;
My_Name : Orb_Tools.Content_String;
Cpt : Natural;
My_Connection : Transport.Connection_Id;
My_Status : Transport_Defs.Status_Code;
To_Transmit : Orb_Tools.Data_String;
To_Accept : Orb_Tools.Data_String;
From_Orb : Byte_Defs.Byte_String (0 .. 255);
The_Net : constant Transport_Defs.Network_Name := "TCP/IP";
Order : Character;
begin
-- REGISTRATION
My_Command := Message.Registration;
Orb_Tools.Copy (Source => "Server", Target => My_Name);
Orb_Tools.Copy (Source => Transport.Local_Host (The_Net),
Target => My_Host);
Transport.Open (My_Connection, My_Status, The_Net);
Orb_Tools.Copy (Source => Transport.Local_Socket (My_Connection),
Target => My_Socket);
Orb_Tools.Copy (Source => My_Socket, Target => My_Content);
Orb_Tools.Append (Target => My_Content, Source => ":");
Orb_Tools.Append (Target => My_Content, Source => My_Host);
Orb_Tools.Append (Target => My_Content, Source => ":");
Orb_Tools.Append (Target => My_Content, Source => My_Name);
Message.Fill_Content (Mess => My_Mess, Cont => My_Content);
Message.Fill_Command (Mess => My_Mess, Comm => My_Command);
Message.Fill_Origin (Mess => My_Mess, Orig => My_Id);
Message.Fill (Data => To_Transmit, Mess => My_Mess);
Text_Io.Put_Line ("Server : send registration to ORB : " &
Orb_Tools.Image (To_Transmit));
while not Transport.Is_Connected (My_Connection) loop
Transport.Connect (My_Connection, My_Status,
(193, 54, 146, 132), (10, 42));
end loop;
Transport.Transmit (My_Connection, My_Status,
Orb_Tools.Vstring_To_Byte_String (To_Transmit), Cpt);
Transport.Disconnect (My_Connection);
Text_Io.Put_Line ("Server : data transmited.");
-- WAITING FOR ID
Text_Io.Put_Line ("Server : wait for ID...");
while not Transport.Is_Connected (My_Connection) loop
Transport.Connect (My_Connection, My_Status);
end loop;
loop
Transport.Receive (My_Connection, My_Status, From_Orb, Cpt);
exit when Transport_Defs.Image (My_Status) = "OK";
end loop;
Text_Io.Put ("Server : received message from ORB : ");
Orb_Tools.Copy (Target => To_Accept, Source => From_Orb (0 .. Cpt - 1));
Text_Io.Put_Line (Orb_Tools.Image (To_Accept));
Message.Unfill (To_Accept, My_Mess);
Message.Unfill_Content (My_Mess, My_Content);
My_Id := Identification.Tclient_Id'Value (Orb_Tools.Image (My_Content));
Transport.Disconnect (My_Connection);
-- SEND PUBLICATION
My_Command := Message.Publication;
Orb_Tools.Copy (Target => My_Content, Source => "Datum");
Message.Fill_Command (My_Mess, My_Command);
Message.Fill_Content (My_Mess, My_Content);
Message.Fill_Origin (Mess => My_Mess, Orig => My_Id);
Message.Fill (Data => To_Transmit, Mess => My_Mess);
Text_Io.Put_Line ("Server : send publication to ORB : " &
Orb_Tools.Image (To_Transmit));
while not Transport.Is_Connected (My_Connection) loop
Transport.Connect (My_Connection, My_Status,
(193, 54, 146, 132), (10, 42));
end loop;
Text_Io.Put_Line ("Server : connected to ORB");
Transport.Transmit (My_Connection, My_Status,
Orb_Tools.Vstring_To_Byte_String (To_Transmit), Cpt);
Transport.Disconnect (My_Connection);
Text_Io.Put_Line ("Server : data transmited.");
-- WAITING FOR REQUEST
Text_Io.Put_Line ("Server : wait for Request...");
loop
while not Transport.Is_Connected (My_Connection) loop
Transport.Connect (My_Connection, My_Status);
end loop;
loop
Transport.Receive (My_Connection, My_Status, From_Orb, Cpt);
exit when Transport_Defs.Image (My_Status) = "OK";
end loop;
Text_Io.Put ("Server : received message from ORB : ");
Orb_Tools.Copy (Target => To_Accept, Source => From_Orb (0 .. Cpt - 1));
Message.Unfill (To_Accept, My_Mess);
Message.Unfill_Content (My_Mess, My_Content);
Text_Io.Put_Line (Orb_Tools.Image (To_Accept));
Transport.Disconnect (My_Connection);
-- SEND A FORWARD
Orb_Tools.Copy (Target => My_Content, Source => "02/23/96 4.00pm");
Message.Fill_Content (My_Mess, My_Content);
Message.Fill_Command (My_Mess, Message.Forward);
Message.Fill_Origin (My_Mess, My_Id);
Message.Fill (Data => To_Transmit, Mess => My_Mess);
Text_Io.Put_Line ("Server : send answer to ORB : " &
Orb_Tools.Image (To_Transmit));
while not Transport.Is_Connected (My_Connection) loop
Transport.Connect (My_Connection, My_Status,
(193, 54, 146, 132), (10, 42));
end loop;
Text_Io.Put_Line ("Server : connected to ORB");
Transport.Transmit
(My_Connection, My_Status,
Orb_Tools.Vstring_To_Byte_String (To_Transmit), Cpt);
Transport.Disconnect (My_Connection);
Text_Io.Put_Line ("Server : data transmited.");
Text_Io.Put ("q : quit , others : continue");
Text_Io.Get (Order);
exit when Order = 'q';
end loop;
-- SEND AN UNPUBLICATION
Orb_Tools.Copy (Target => My_Content, Source => "Datum");
Message.Fill_Content (My_Mess, My_Content);
Message.Fill_Command (My_Mess, Message.Unpublication);
Message.Fill_Origin (My_Mess, My_Id);
Message.Fill (Data => To_Transmit, Mess => My_Mess);
Text_Io.Put_Line ("Server : send unpublication to ORB : " &
Orb_Tools.Image (To_Transmit));
while not Transport.Is_Connected (My_Connection) loop
Transport.Connect (My_Connection, My_Status,
(193, 54, 146, 132), (10, 42));
end loop;
Text_Io.Put_Line ("Server : connected to ORB");
Transport.Transmit (My_Connection, My_Status,
Orb_Tools.Vstring_To_Byte_String (To_Transmit), Cpt);
Transport.Disconnect (My_Connection);
Text_Io.Put_Line ("Server : data transmited.");
-- SEND AN UNREGISTRATION
My_Command := Message.Unregistration;
Orb_Tools.Copy (Target => My_Content, Source => "");
Message.Fill_Content (Mess => My_Mess, Cont => My_Content);
Message.Fill_Command (Mess => My_Mess, Comm => My_Command);
Message.Fill_Origin (Mess => My_Mess, Orig => My_Id);
Message.Fill (Data => To_Transmit, Mess => My_Mess);
Text_Io.Put_Line ("Server : send unregistration to ORB :" &
Orb_Tools.Image (To_Transmit));
while not Transport.Is_Connected (My_Connection) loop
Transport.Connect (My_Connection, My_Status,
(193, 54, 146, 132), (10, 42));
end loop;
Text_Io.Put_Line ("Server : Connected to Orb");
Transport.Transmit (My_Connection, My_Status,
Orb_Tools.Vstring_To_Byte_String (To_Transmit), Cpt);
Transport.Disconnect (My_Connection);
Text_Io.Put_Line ("Server : data transmited.");
Transport.Close (My_Connection);
end Objet_Serveur;
nblk1=9
nid=0
hdr6=12
[0x00] rec0=25 rec1=00 rec2=01 rec3=07a
[0x01] rec0=16 rec1=00 rec2=03 rec3=03c
[0x02] rec0=21 rec1=00 rec2=04 rec3=050
[0x03] rec0=03 rec1=00 rec2=09 rec3=02a
[0x04] rec0=1d rec1=00 rec2=08 rec3=02c
[0x05] rec0=1f rec1=00 rec2=07 rec3=01c
[0x06] rec0=1c rec1=00 rec2=02 rec3=042
[0x07] rec0=1c rec1=00 rec2=06 rec3=014
[0x08] rec0=19 rec1=00 rec2=05 rec3=001
tail 0x2154df8e287c68a0cc304 0x42a00088462060003