|
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: 6144 (0x1800) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package Telnet_Port, seg_012b43
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with System_Utilities; with Telnet_Protocol; with Terminal_Specific; package Telnet_Port is subtype Port_Type is System_Utilities.Port; subtype File_Type is Terminal_Specific.File_Type; function Name (Port : Port_Type) return String renames System_Utilities.Terminal_Name; -- A port may be read or written by opening a File_Type object on -- it, with Open.Name => Name (Port); and using the Read and Write -- operations defined on File_Type (see package Terminal_Specific). function Port (File : File_Type) return Port_Type; -- Return the port on which the given File was opened. -- If File was not opened on a port, raise Not_A_Telnet_Port. function Is_A_Telnet_Port (Port : Port_Type) return Boolean; function Is_A_Telnet_Port (File : File_Type) return Boolean; -- Return true iff the given object identifies a Telnet port. -- Is_A_Telnet_Port (File) = Is_A_Telnet_Port (Port (File)). Not_A_Telnet_Port : exception; -- Raised if any of the operations below are attempted on -- a File that was not opened on a Telnet port. -- Although the operations below take File_Type parameters, they -- actually manipulate underlying permanent Port data structures. -- One may open and close File_Type handles repeatedly on a given -- port, without changing the state associated with that port. -- In particular, closing a File does NOT disconnect the port, nor -- reset its Convert_Received_New_Line_to_CR switch to the default. -- design note: File_Type is used instead of Port_Type to force -- the client of this package to obtain a lock on the port before -- manipulating its state; if the lock cannot be obtained then the -- state cannot be manipulated. This is a feature: it allows a job -- (for example the login manager or core editor) to prevent other -- jobs from messing with the state of its port. -- For each Telnet port there is a Boolean that, if True, causes each -- received CRLF (Telnet new_line) sequence to be read as CR alone. -- The purpose of this switch is to support Telnet terminal servers -- that transmit the single keystroke [return] as a Telnet new_line. -- At system boot time, every port's switch is set to True. It may -- be changed at any time. procedure Set_Convert_Received_New_Line_To_Cr (File : File_Type; Enabled : Boolean := True); -- Set the switch to the given value. function Get_Convert_Received_New_Line_To_Cr (File : File_Type) return Boolean; -- Return the present value of the switch. procedure Connect (File : File_Type; Connection : Telnet_Protocol.Connection_Id); -- If Is_Connected (File) then Disconnect (File); -- Bind the Telnet port identified by File to the given Connection. procedure Connect (File : File_Type; Max_Wait : Duration := Duration'Last); -- If Is_Connected (File) then do nothing and return immediately. -- Otherwise, wait for an incoming connection on TCP/IP socket 23. -- If it arrives within Max_Wait, open a Telnet connection, and -- bind it to the Telnet port identified by the given File. -- Otherwise, raise Not_Connected. function Is_Connected (File : File_Type) return Boolean; -- Return true iff the given File identifies a Telnet port that -- is bound to a Telnet_Protocol.Connection_Id that is connected. -- If a Telnet port is connected, then data written to it will -- be transmitted on the associated Telnet connection, and -- data received on that connection may be read from the port. -- If a Telnet port is not connected, then data written to it -- will be discarded (ignored), and any attempt to read from it -- will first execute Connect (File, Max_Wait). procedure Disconnect (File : File_Type); -- if Is_Connected (File) then Telnet_Protocol.Close (Connection (File)). function Connection (File : File_Type) return Telnet_Protocol.Connection_Id; -- Return the Connection that is currently bound to the Telnet port -- that is identified by File. If there is none, raise Not_Connected. Not_Connected : exception; end Telnet_Port;
nblk1=5 nid=0 hdr6=a [0x00] rec0=1a rec1=00 rec2=01 rec3=01a [0x01] rec0=11 rec1=00 rec2=02 rec3=02a [0x02] rec0=15 rec1=00 rec2=03 rec3=022 [0x03] rec0=13 rec1=00 rec2=04 rec3=048 [0x04] rec0=0a rec1=00 rec2=05 rec3=000 tail 0x2170e64b682b14dd58573 0x42a00088462060003