Discuss this help topic in SecureBlackbox Forum

TElSSHServer.OnBeforeOpenCommand

TElSSHServer     See also     


Filter: C#  VB.NET  Pascal  C++  PHP  Java  


This event is fired when the client requested execution of the command.

Declaration

[C#]
    event TSSHBeforeOpenCommandEvent OnBeforeOpenCommand;
    delegate void TSSHBeforeOpenCommandEvent(Object Sender, TElSSHTunnelConnection Connection, string Command, ref bool Accept);

[VB.NET]
    Event OnBeforeOpenCommand As TSSHBeforeOpenCommandEvent
    Delegate Sub TSSHBeforeOpenCommandEvent(ByVal Sender As Object, ByVal Connection As TElSSHTunnelConnection, ByVal Command As String, ByRef Accept As Boolean)

[Pascal]
    property OnBeforeOpenCommand : TSSHBeforeOpenCommandEvent;
    TSSHBeforeOpenCommandEvent = procedure(Sender: TObject; Connection : TElSSHTunnelConnection; const Command: string; var Accept : boolean) of object;

[C++]
    void get_OnBeforeOpenCommand(TSSHBeforeOpenCommandEvent &pMethodOutResult, void * &pDataOutResult);
    void set_OnBeforeOpenCommand(TSSHBeforeOpenCommandEvent pMethodValue, void * pDataValue);
    typedef void (SB_CALLBACK *TSSHBeforeOpenCommandEvent)(void * _ObjectData, TObjectHandle Sender, TElSSHTunnelConnectionHandle Connection, const char * pcCommand, int32_t szCommand, int8_t &Accept);

[PHP]
    TSSHBeforeOpenCommandEvent|callable|NULL get_OnBeforeOpenCommand()
    void set_OnBeforeOpenCommand(TSSHBeforeOpenCommandEvent|callable|NULL $Value)
    callable TSSHBeforeOpenCommandEvent(TObject $Sender, TElSSHTunnelConnection $Connection, string $Command, bool &$Accept)

[Java]
    TSSHBeforeOpenCommandEvent getOnBeforeOpenCommand();
    void setOnBeforeOpenCommand(TSSHBeforeOpenCommandEvent Value);
    TSSHBeforeOpenCommandEvent.Callback OnBeforeOpenCommand = new TSSHBeforeOpenCommandEvent.Callback() {
        public void TSSHBeforeOpenCommandEventCallback(TObject Sender, TElSSHTunnelConnection Connection, String Command, TSBBoolean Accept) {
            //...
        }
    }

Parameters

  • Connection - logical connection
  • Command - command to be executed
  • Accept - set this parameter to True if you agree to execute the Command
  • pcCommand - command to be executed
  • szCommand - the length of pcCommand.

Description

    If you agree to execute the Command, set Access parameter to True.
     Note, session for Connection has been established before command opening. This event is preceded by OnBeforeOpenSession and OnOpenSession ones.

Discuss this help topic in SecureBlackbox Forum