Indy 9 | Content | Index | Reference

TIdRexecServer
Hierarchy, Properties, Methods, Events, See Also, Unit: IdRexecServer
Implements a Remote Execution (REXEC) daemon.

    TIdRexecServer = class(TIdRemoteCMDServer)

Unit
IdRexecServer
Description
TIdRexecServer is a TIdRemoteCMDServer decendant that implements a multi-threaded REXEC Daemon (Server) based on the Remote Execution (REXEC) defacto standard.

The REXEC protocol provides remote execution facilities for a command, using authentication based on username and password values. execution. The REXEC daemon performs automatic login, and user authentication when user name and password are provided.

TIdRexecServer implements event handlers that allow notification and execution of a command from a remote client. Client connections to TIdRexecServer may provide a port number to be used for redirect output from the standard error handler, or NULL to indicate that standard error redirection is not required.

A TIdRexecServer implementation may assign a procedure to the OnCommand event handler to OnCommand to control execution of the client thread.

TIdRexecServer.DefaultPort
TIdRexecServer, See Also
The port number used when listening for new client connections.

    property DefaultPort: integer;

Description
DefaultPort is an Integer property that represent the default port number used to listen for new client connections. The value of DefaultPort is provided for use with TIdSocketHandles. TIdTCPServer and descendant classes use the DefaultPort number to bind allocated sockets handles when the Active property to set to True.

The default value for DefaultPort is Id_PORT_exec as assigned in the Create method.

TIdRexecServer.Create
TIdRexecServer, See Also
Constructor for the object instance.

    constructor Create(AOwner: TComponent); override;

Parameters
AOwner: TComponent
Owner of the object instance.
Description
Create is the constructor for the object instance, and relies on the inherited Create method to initialize the object instance. Create assigns the value Id_PORT_exec to the DefaultPort, as is the accepted practice for the RExec protocol.

Create sets the value in ForcePortsInRange to False, since the RExec protocol does not require that port numbers for client connections reside in a specific range.

TIdRexecServer.OnCommand
TIdRexecServer, See Also
Event handler for executing a command from a remote client connection.

    property OnCommand: TIdRexecCommandEvent;

Description
OnCommand is a TIdRexecCommandEvent property that represents the event handler signalled during execution of a threaqded client connetion to the RExec protocol server. OnCommand allows the server to perform authentication and execution of a command request from the remote client using arguments provide in the TIdRexecCommandEvent event notification.

The TIdRexecServer implementation must assign a procedure to the event handler to allow responding to the event notification.

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.