|
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: 8192 (0x2000) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Client, seg_056e08
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧
with Transport; with Transport_Defs; with Text_Io; with Io; with Byte_Defs; with System; procedure Client is Connection : Transport.Connection_Id; Local_Connection : Transport.Connection_Id; Status : Transport_Defs.Status_Code; Numero : Natural; Iter : Transport.Connection_Id_Iterator; Socket_Trouve : Boolean := False; Mess : String (1 .. 100); Taille : Natural; Sock_Low : Natural; Sock_High : Natural; Reponse : Character; function String_To_Bs (Chaine : String) return Byte_Defs.Byte_String is Bs : Byte_Defs.Byte_String (Chaine'Range); begin for I in Chaine'Range loop Bs (I) := Character'Pos (Chaine (I)); end loop; return Bs; end String_To_Bs; begin Text_Io.Put_Line ("message a envoyer : "); Text_Io.Get_Line (Item => Mess, Last => Taille); Text_Io.Put_Line ("No Socket low : "); Io.Get (Item => Sock_Low, Width => 0); Text_Io.Put_Line ("No Socket High : "); Io.Get (Item => Sock_High, Width => 0); Transport.Open (Connection => Local_Connection, Status => Status, Network => "TCP/IP", Local_Socket => Transport_Defs.Null_Socket_Id); if Transport_Defs."/=" (Status, Transport_Defs.Ok) then Text_Io.Put_Line ("Local_Connection non ouverte ."); return; end if; Transport.Init (Iter); while not Transport.Done (Iter) loop Connection := Transport.Value (Iter); declare Socket : constant Transport_Defs.Socket_Id := Transport.Local_Socket (Connection); begin if (System."=" (Socket (Socket'First), System.Byte (Sock_Low)) and (System."=" (Socket (Socket'Last), System.Byte (Sock_High)))) then Socket_Trouve := True; exit; end if; end; Transport.Next (Iter); end loop; if Socket_Trouve then for I in 1 .. 5 loop Transport.Connect (Connection => Local_Connection, Status => Status, Remote_Host => Transport.Local_Host (Connection), Remote_Socket => Transport.Local_Socket (Connection), Max_Wait => 1.0); if Transport_Defs."=" (Status, Transport_Defs.Ok) then exit; else Text_Io.Put_Line ("Status connect : " & Transport_Defs.Image (Status)); end if; end loop; if Transport_Defs."=" (Status, Transport_Defs.Ok) then declare Count : Natural; Bs : constant Byte_Defs.Byte_String := String_To_Bs (Mess (Mess'First .. Mess'First + Taille - 1)); begin Transport.Transmit (Connection => Local_Connection, Status => Status, Data => Bs, Count => Count, Max_Wait => Duration'Last, More => False); Text_Io.Put_Line ("status transmit : " & Transport_Defs.Image (Status)); Text_Io.Put_Line ("count : " & Natural'Image (Count)); end; end if; end if; Text_Io.Put_Line ("avant le close ..."); Text_Io.Get (Item => Reponse); Transport.Close (Local_Connection); end Client;
nblk1=7 nid=6 hdr6=a [0x00] rec0=26 rec1=00 rec2=01 rec3=02e [0x01] rec0=02 rec1=00 rec2=07 rec3=004 [0x02] rec0=1a rec1=00 rec2=05 rec3=01c [0x03] rec0=1c rec1=00 rec2=03 rec3=020 [0x04] rec0=15 rec1=00 rec2=04 rec3=000 [0x05] rec0=0a rec1=00 rec2=03 rec3=000 [0x06] rec0=10 rec1=70 rec2=00 rec3=037 tail 0x2154dd94c87c57106ce06 0x42a00088462060003 Free Block Chain: 0x6: 0000 00 02 03 fc 80 2a 20 41 66 66 69 63 68 65 20 28 ┆ * Affiche (┆ 0x2: 0000 00 00 03 fc 80 32 20 20 20 20 20 4e 65 74 20 3a ┆ 2 Net :┆