Indy 9
|
TIdTelnet = class(TIdTCPClient)
TIdTelnet is a TIdTCPClient descendant used to transmit data with interspersed TELNET control information.
TIdTelnet provides a general, eight-bit byte-oriented communications facility designed to interface terminal devices and terminal-oriented processes. The TELNET protocol may also be used for terminal-to-terminal communication ("linking") and process-to-process communication (distributed computation).
TIdTelnet also provides negotiated options that allows additional services over and above those available within an NVT (Network Virtual Terminal).
property OnConnect: TNotifyEvent;
Applications should assign a procedure to the OnConnect event handler to respond to connection requests or perform special processing prior to opening the socket connection.
property OnDisconnect: TNotifyEvent;
Applications should assign a procedure to the OnDisconnect event handler to perform processing required after closing the socket connection.
property TelnetThread: TIdTelnetReadThread;
TelnetThread is created when the client connects to the host, and terminated when the client disconnects from the host.
property Terminal: string;
Note: Indy does not provide terminal emulation other than a dumb terminal NVT implementation. Any non-null string value can be used in Terminal.
procedure Connect(const ATimeout: Integer = IdTimeoutDefault); override;
Connect triggers the OnConnect event prior to using the inherited Connect method to open the socket connection. If the client is connected, the TelnetThread property is initialized.
Connect can raise an EIdException exception with the constant message RSTELNETCLIConnectError if an EIdSocketError occurs.
constructor Create(AOwner: TComponent); override;
procedure Disconnect; override;
procedure SendCh(Ch: Char);
property OnDataAvailable: TIdTelnetDataAvailEvent;
Applications must assign a procedure to the OnDataAvailable event handler to allow the TIdTelnet object to determine how data from the host is applied.
property OnTelnetCommand: TIdTelnetCommandEvent;
Applications should assign a procedure to the event handler in order to respond to specific TELNET commands, or to perform TELNET options; i.e. tncNoLocalEcho, tncLocalEcho, or tncEcho.