|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 4393 (0x1129)
Types: TextFile
Names: »B«
└─⟦149519bd4⟧ Bits:30000546 8mm tape, Rational 1000, !projects 93-07-13
└─⟦124ff5788⟧ »DATA«
└─⟦this⟧
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
└─⟦129cab021⟧ »DATA«
└─⟦this⟧
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
└─⟦6f12a12be⟧ »DATA«
└─⟦this⟧
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
└─⟦d65440be7⟧ »DATA«
└─⟦this⟧
with Host_Name;
with Low_Level_Message;
with Mailbox_Msg_To_Send;
with Mailbox_Received_Msg;
with Physical_Layer;
with Socket_Defs;
with Socket_Port_Manager;
with Text_Io;
with Umps_Utilities;
package body Behavior_Link_Layer is
task body Server is
The_Behavior_Listen_Socket_Port : Socket_Port.Object;
The_Behavior_Host_Name : Low_Level_Message.Object;
The_Behavior_Listen_Socket_Id : Socket_Defs.Socket_Id;
The_Task_Performing_Mailbox_Received_Msg :
Mailbox_Received_Msg.Access_Task_Mailbox;
begin
accept Start (Behavior_Listen_Socket_Port : Socket_Port.Object;
Task_Performing_Mailbox_Received_Msg :
Mailbox_Received_Msg.Access_Task_Mailbox) do
The_Behavior_Listen_Socket_Port := Behavior_Listen_Socket_Port;
The_Task_Performing_Mailbox_Received_Msg :=
Task_Performing_Mailbox_Received_Msg;
The_Behavior_Listen_Socket_Id :=
Physical_Layer.Create_Server (The_Behavior_Listen_Socket_Port);
Text_Io.Put_Line ("Ok.");
end Start;
declare
The_Behavior_Service_Socket_Id : Socket_Defs.Socket_Id;
The_Buffer_To_Receive : Low_Level_Message.Object;
The_Number_Of_Caracteres_Received : Integer;
Result : Boolean;
begin
loop
-- Connection to get a message :
The_Behavior_Service_Socket_Id :=
Physical_Layer.Server_Wait_For_A_Connection
(The_Behavior_Listen_Socket_Id);
Physical_Layer.Receive_String
(The_Behavior_Service_Socket_Id, The_Buffer_To_Receive,
The_Number_Of_Caracteres_Received);
-- Send the message to the received_message_fifo :
The_Task_Performing_Mailbox_Received_Msg.Put
(The_Buffer_To_Receive, Result);
if Result = False then
Text_Io.Put_Line
("Behavior_Link_Layer.Server : Putting message into received messages fifo impossible");
end if;
Physical_Layer.Close_Socket (The_Behavior_Service_Socket_Id);
end loop;
end;
end Server;
task body Client is
The_Broker_Listen_Socket_Port : Socket_Port.Object;
The_Broker_Host_Name : Host_Name.Object;
The_Task_Performing_Mailbox_Msg_To_Send :
Mailbox_Msg_To_Send.Access_Task_Mailbox;
The_Msg : Low_Level_Message.Object;
Result : Boolean;
Service_Socket_Id : Socket_Defs.Socket_Id;
Number_Of_Characters_Sent : Integer;
begin
accept Start (Broker_Listen_Socket_Port : Socket_Port.Object;
Broker_Host_Name : Host_Name.Object;
Task_Performing_Mailbox_Msg_To_Send :
Mailbox_Msg_To_Send.Access_Task_Mailbox) do
The_Broker_Listen_Socket_Port := Broker_Listen_Socket_Port;
The_Broker_Host_Name := Broker_Host_Name;
The_Task_Performing_Mailbox_Msg_To_Send :=
Task_Performing_Mailbox_Msg_To_Send;
end Start;
loop
select -- Active wait ....
The_Task_Performing_Mailbox_Msg_To_Send.Get (The_Msg, Result);
if Result = True then
Service_Socket_Id := Physical_Layer.Join_Server
(The_Broker_Host_Name,
The_Broker_Listen_Socket_Port);
if Service_Socket_Id < 0 then
raise Socket_Defs.Join_Server_Error;
end if;
Physical_Layer.Send_String (Service_Socket_Id, The_Msg,
Number_Of_Characters_Sent);
Physical_Layer.Close_Socket (Service_Socket_Id);
end if;
else
null;
end select;
end loop;
end Client;
end Behavior_Link_Layer;