Class TTelnetSend

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TTelnetSend = class(TSynaClient)

Description

Class with implementation of Telnet/SSH script client.

Note: Are you missing properties for specify server address and port? Look to parent TSynaClient too!

Hierarchy

Overview

Methods

Public constructor Create;
Public destructor Destroy; override;
Public function Login: Boolean;
Public function SSHLogin: Boolean;
Public procedure Logout;
Public procedure Send(const Value: string);
Public function WaitFor(const Value: string): Boolean;
Public function RecvTerminated(const Terminator: string): string;
Public function RecvString: string;

Properties

Published property Sock: TTCPBlockSocket read FSock;
Published property SessionLog: Ansistring read FSessionLog write FSessionLog;
Published property TermType: Ansistring read FTermType write FTermType;

Description

Methods

Public constructor Create;
 
Public destructor Destroy; override;
 
Public function Login: Boolean;

Connects to Telnet server.

Public function SSHLogin: Boolean;

Connects to SSH2 server and login by Username and Password properties.

You must use some of SSL plugins with SSH support. For exammple CryptLib.

Public procedure Logout;

Logout from telnet server.

Public procedure Send(const Value: string);

Send this data to telnet server.

Public function WaitFor(const Value: string): Boolean;

Reading data from telnet server until Value is readed. If it is not readed until timeout, result is False. Otherwise result is True.

Public function RecvTerminated(const Terminator: string): string;

Read data terminated by terminator from telnet server.

Public function RecvString: string;

Read string from telnet server.

Properties

Published property Sock: TTCPBlockSocket read FSock;

Socket object used for TCP/IP operation. Good for seting OnStatus hook, etc.

Published property SessionLog: Ansistring read FSessionLog write FSessionLog;

all readed datas in this session (from connect) is stored in this large string.

Published property TermType: Ansistring read FTermType write FTermType;

Terminal type indentification. By default is 'SYNAPSE'.


Generated by PasDoc 0.9.0 on 2012-04-23 21:38:52