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 - downloadIndex: ┃ B T ┃
Length: 5860 (0x16e4) 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 T_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 ("(Behavior_Link_Layer).Start_Server : Finished."); 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 : Text_Io.Put_Line ("(Behavior_Link_Layer).Server Start waiting far a connection."); The_Behavior_Service_Socket_Id := Physical_Layer.Server_Wait_For_A_Connection (The_Behavior_Listen_Socket_Id); Text_Io.Put_Line ("(Behavior_Link_Layer).Server I got one."); Physical_Layer.Receive_String (The_Behavior_Service_Socket_Id, The_Buffer_To_Receive, The_Number_Of_Caracteres_Received); Text_Io.Put_Line ("(Behavior_Link_Layer).Server I received the message"); -- Send the message to the received_message_fifo : The_Task_Performing_Mailbox_Received_Msg.Put (The_Buffer_To_Receive, Result); Text_Io.Put_Line ("(Behavior_Link_Layer).Server The message has been sent to the Mailbox"); 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 T_Server; task body T_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; Text_Io.Put_Line ("(Behavior_Link_Layer).Start_Client : Finished."); end Start; Text_Io.Put_Line ("(Behavior_Link_Layer).Client : Start waiting far a connection to establish."); loop select -- Active wait .... The_Task_Performing_Mailbox_Msg_To_Send.Get (The_Msg, Result); if Result = True then Text_Io.Put_Line ("(Behavior_Link_Layer).Client : I've to send a message."); Service_Socket_Id := Physical_Layer.Join_Server (The_Broker_Host_Name, The_Broker_Listen_Socket_Port); Text_Io.Put_Line ("(Behavior_Link_Layer).Client : I joined the Server."); 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); Text_Io.Put_Line ("(Behavior_Link_Layer).Client : The message was sent"); Physical_Layer.Close_Socket (Service_Socket_Id); Text_Io.Put_Line ("(Behavior_Link_Layer).Client : The connection is close."); else Text_Io.Put_Line ("(Behavior_Link_Layer).Client : No message present"); delay (Duration (2)); end if; else Text_Io.Put_Line ("(Behavior_Link_Layer).Client : No connection."); delay (Duration (2)); end select; end loop; end T_Client; end Behavior_Link_Layer;