|
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: 8192 (0x2000) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Mail_Sender, seg_05744f
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
package body Mail_Sender is procedure Init (The_Connection : in out Transport.Connection_Id; The_Network_Kind : Transport_Defs.Network_Name; The_Local_Socket : in out Orb_Defs.Socket_Id) is The_Status : Transport_Defs.Status_Code; begin Text_Io.Put_Line ("Mail Sender trying to open connection."); if Orb_Defs."=" (The_Local_Socket, Orb_Defs.Null_Socket_Id) then while not Transport.Is_Open (The_Connection) loop Transport.Open (Connection => The_Connection, Status => The_Status, Network => The_Network_Kind, Local_Socket => Transport_Defs.Null_Socket_Id); end loop; else while not Transport.Is_Open (The_Connection) loop Transport.Open (Connection => The_Connection, Status => The_Status, Network => The_Network_Kind, Local_Socket => The_Local_Socket); end loop; end if; The_Local_Socket := Transport.Local_Socket (The_Connection); Text_Io.Put_Line ("Connection opened by mail_sender."); end Init; procedure Send_Mail (The_Connection : Transport.Connection_Id; The_Remote_Host : Transport_Defs.Host_Id; The_Remote_Socket : Orb_Defs.Socket_Id; The_Time_Out : Natural; Success : out Boolean; The_Mail_To_Send : Element) is The_Status : Transport_Defs.Status_Code; The_Mail_To_Send_Bytes : Frame_Defs.Communication_Data; The_Count : Natural; Fin : Boolean := False; Index : Natural := The_Time_Out; begin while Fin = False loop Transport.Connect (Connection => The_Connection, Status => The_Status, Remote_Host => The_Remote_Host, Remote_Socket => The_Remote_Socket); Index := Index - 1; if Index = 0 then Fin := True; else if Transport.Is_Connected (The_Connection) then Fin := True; else Fin := False; end if; end if; Text_Io.Put_Line ("Try to connect the socket"); delay (2.0); end loop; if Transport_Defs.Image (The_Status) /= Transport_Defs.Image (Transport_Defs.Ok) then Success := False; Text_Io.Put_Line ("Problem to connect !!!!"); if Index = 0 then Text_Io.Put_Line ("Time out while trying to connect"); end if; else Success := True; Text_Io.Put_Line ("Connection made by mail sender."); Convert (The_Mail_To_Send, The_Mail_To_Send_Bytes); Transport.Transmit (Connection => The_Connection, Status => The_Status, Data => The_Mail_To_Send_Bytes, Count => The_Count); if Transport_Defs.Image (The_Status) /= Transport_Defs.Image (Transport_Defs.Ok) then Success := False; Text_Io.Put_Line ("Problem while transmitting."); else Success := True; Text_Io.Put_Line ("Mail sender has transmited something."); Transport.Disconnect (The_Connection); Text_Io.Put_Line ("Disconnected."); end if; end if; Text_Io.Put_Line ("going out of send_mail with status = " & Transport_Defs.Image (The_Status)); end Send_Mail; procedure Close (The_Connection : Transport.Connection_Id) is begin Transport.Close (The_Connection); end Close; end Mail_Sender;
nblk1=7 nid=3 hdr6=a [0x00] rec0=15 rec1=00 rec2=01 rec3=010 [0x01] rec0=16 rec1=00 rec2=02 rec3=06c [0x02] rec0=1b rec1=00 rec2=04 rec3=010 [0x03] rec0=17 rec1=00 rec2=07 rec3=07a [0x04] rec0=0a rec1=00 rec2=06 rec3=000 [0x05] rec0=0a rec1=00 rec2=07 rec3=000 [0x06] rec0=7a rec1=28 rec2=00 rec3=03c tail 0x21764435087c776451927 0x42a00088462060003 Free Block Chain: 0x3: 0000 00 05 00 15 80 02 65 3b 02 00 0d 20 20 20 20 20 ┆ e; ┆ 0x5: 0000 00 00 00 45 80 07 65 63 74 69 6f 6e 2c 07 00 34 ┆ E ection, 4┆