|
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 - download
Length: 4096 (0x1000) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Channel_Operator, seg_054d5e
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with B_Constant; with Bls_Constant; with Transport; with Transport_Defs; with Byte_Defs; with Connection_Def; with Utils; with Text_Io; package body Channel_Operator is 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 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 : String) is --begin -- Text_Io.Put_Line ("dfklgfkldgb"); -- Transport.Connect (O.Connect, O.Status, O.Host, -- O.Socket, Duration'Last); -- Transport.Transmit (O.Connect, O.Status, -- Utils.String_To_Byte_String (Msg), O.Count); -- Transport.Disconnect (O.Connect); -- --end Send; procedure Receive (O : in out Object; Msg : out Byte_Defs.Byte_String; Result : out Boolean) is begin Result := False; Transport.Connect (O.Connect, O.Status, Time_Out_Delay); if Transport.Is_Connected (O.Connect) then Transport.Receive (O.Connect, O.Status, Msg, O.Count); Transport.Disconnect (O.Connect); Result := True; end if; end Receive; procedure Init (O : in out Object; S : Transport_Defs.Socket_Id := Transport_Defs.Null_Socket_Id; H : Transport_Defs.Host_Id := Transport_Defs.Null_Host_Id; Result : out Boolean) is begin Text_Io.Put_Line ("init socket operator"); Transport.Open (O.Connect, O.Status, Bls_Constant.Protocole, S); O.Socket (1 .. Bls_Constant.Size_Of_Our_Socket_Id) := Transport.Local_Socket (Connection => O.Connect); O.Host := Transport.Local_Host (O.Connect); Result := Transport.Is_Open (Connection => O.Connect); end Init; procedure Close (O : in out Object) is begin Text_Io.Put_Line ("close a socket"); Transport.Close (O.Connect); end Close; end Channel_Operator;
nblk1=3 nid=0 hdr6=6 [0x00] rec0=23 rec1=00 rec2=01 rec3=016 [0x01] rec0=19 rec1=00 rec2=02 rec3=040 [0x02] rec0=13 rec1=00 rec2=03 rec3=000 tail 0x2175d82a287b884bf0a53 0x42a00088462060003