|
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: 7168 (0x1c00) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Channel_User, seg_0576df, seg_0576e0
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with Bls_Constant; with Transport; with Transport_Defs; with Transport_Name; with Byte_Defs; with Connection_Def; with Utils; with Task_Io; package body Channel_User is function Null_Channel return Object is O : Object; begin O.Connect := Transport.Null_Connection_Id; O.Status := Transport_Defs.Status_Code (0); O.Count := Natural (0); O.Socket := Null_Socket_Id; O.Host := Null_Host_Id; return O; end Null_Channel; function Image (S : Transport_Defs.Socket_Id) return String is begin return Utils.Byte_String_To_String (Byte_Defs.Byte_String (S)); end Image; function Image (H : Transport_Defs.Host_Id) return String is begin return Utils.Byte_String_To_String (Byte_Defs.Byte_String (H)); end Image; function Image (O : Object) return String is begin return Image (O.Socket) & Image (O.Host); end Image; function Get_Socket_Id (O : Object) return Transport_Defs.Socket_Id is begin return O.Socket; end Get_Socket_Id; function Get_Host_Id (O : Object) return Transport_Defs.Host_Id is begin return O.Host; end Get_Host_Id; procedure Send (O : in out Object; Msg : in out Byte_Defs.Byte_String) is Try : Positive := Positive'First; begin Task_Io.Put_Line ("going to send a message !"); delay (The_Delay_Between_Two_Connect * 2); Transport.Connect (O.Connect, O.Status, O.Host, O.Socket, Duration'Last); Connection_Try_Loop: while not Transport.Is_Connected (Connection => O.Connect) loop Transport.Connect (O.Connect, O.Status, O.Host, O.Socket, Duration'Last); delay (The_Delay_Between_Two_Connect); exit Connection_Try_Loop when Try = Number_Of_Try_Max; Try := Try + 1; end loop Connection_Try_Loop; if not Transport.Is_Connected (O.Connect) then Msg (1 .. Bls_Constant.Size_Of_Our_Socket_Id + Bls_Constant.Size_Of_Address) := Utils.String_To_Byte_String (Error_Msg (1 .. Bls_Constant.Size_Of_Our_Socket_Id + Bls_Constant.Size_Of_Address)); Task_Io.Put_Line ("cannot get the connection after "); end if; Task_Io.Put_Line (Natural'Image (Try) & " try to connect :" & Transport_Defs.Image (O.Status)); Transport.Transmit (O.Connect, O.Status, Msg, O.Count); Transport.Disconnect (O.Connect); end Send; procedure Init (O : in out Object; S : Transport_Defs.Socket_Id; H : Transport_Defs.Host_Id; Result : out Boolean) is begin O.Socket := S; O.Host := Transport_Defs.Normalize (H); Transport.Open (O.Connect, O.Status, Bls_Constant.Protocole); Result := Transport.Is_Open (Connection => O.Connect); end Init; procedure Close (O : in out Object) is begin Transport.Close (O.Connect); end Close; end Channel_User;
nblk1=6 nid=3 hdr6=8 [0x00] rec0=24 rec1=00 rec2=01 rec3=01c [0x01] rec0=18 rec1=00 rec2=02 rec3=08a [0x02] rec0=18 rec1=00 rec2=04 rec3=016 [0x03] rec0=0c rec1=00 rec2=05 rec3=000 [0x04] rec0=16 rec1=00 rec2=03 rec3=000 [0x05] rec0=00 rec1=00 rec2=00 rec3=080 tail 0x217648f6e87cb937df3af 0x42a00088462060003 Free Block Chain: 0x3: 0000 00 06 02 dc 80 1c 72 79 29 20 26 20 22 20 74 72 ┆ ry) & " tr┆ 0x6: 0000 00 00 00 8b 80 3a 20 20 20 20 20 20 65 78 69 74 ┆ : exit┆