Discuss this help topic in SecureBlackbox Forum

TElSSHServer.OnBeforeOpenClientForwarding

TElSSHServer     See also     


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


This event is fired when the client requests a client TCP-forwarding.

Declaration

[C#]
    event TSSHBeforeOpenClientForwardingEvent OnBeforeOpenClientForwarding;
    delegate void TSSHBeforeOpenClientForwardingEvent(Object Sender, string DestHost, int DestPort, string SrcHost, int SrcPort, ref bool Accept);

[VB.NET]
    Event OnBeforeOpenClientForwarding As TSSHBeforeOpenClientForwardingEvent
    Delegate Sub TSSHBeforeOpenClientForwardingEvent(ByVal Sender As Object, ByVal DestHost As String, ByVal DestPort As Integer, ByVal SrcHost As String, ByVal SrcPort As Integer, ByRef Accept As Boolean)

[Pascal]
    property OnBeforeOpenClientForwarding: TSSHBeforeOpenClientForwardingEvent;
    TSSHBeforeOpenClientForwardingEvent = procedure(Sender: TObject; const DestHost: string; DestPort: integer; const SrcHost: string; SrcPort: integer; var Accept: boolean) of object;

[C++]
    void get_OnBeforeOpenClientForwarding(TSSHBeforeOpenClientForwardingEvent &pMethodOutResult, void * &pDataOutResult);
    void set_OnBeforeOpenClientForwarding(TSSHBeforeOpenClientForwardingEvent pMethodValue, void * pDataValue);
    typedef void (SB_CALLBACK *TSSHBeforeOpenClientForwardingEvent)(void * _ObjectData, TObjectHandle Sender, const char * pcDestHost, int32_t szDestHost, int32_t DestPort, const char * pcSrcHost, int32_t szSrcHost, int32_t SrcPort, int8_t &Accept);

[PHP]
    TSSHBeforeOpenClientForwardingEvent|callable|NULL get_OnBeforeOpenClientForwarding()
    void set_OnBeforeOpenClientForwarding(TSSHBeforeOpenClientForwardingEvent|callable|NULL $Value)
    callable TSSHBeforeOpenClientForwardingEvent(TObject $Sender, string $DestHost, integer $DestPort, string $SrcHost, integer $SrcPort, bool &$Accept)

[Java]
    TSSHBeforeOpenClientForwardingEvent getOnBeforeOpenClientForwarding();
    void setOnBeforeOpenClientForwarding(TSSHBeforeOpenClientForwardingEvent Value);
    TSSHBeforeOpenClientForwardingEvent.Callback OnBeforeOpenClientForwarding = new TSSHBeforeOpenClientForwardingEvent.Callback() {
        public void TSSHBeforeOpenClientForwardingEventCallback(TObject Sender, String DestHost, int DestPort, String SrcHost, int SrcPort, TSBBoolean Accept) {
            //...
        }
    }

Parameters

  • DestHost - remote host to connect with
  • DestPort - port on the DestHost
  • SrcHost - host connected to the client
  • SrcPort - port on the SrcHost
  • Accept - set this parameter to True if you agree to provide the forwarding.
  • pcDestHost - remote host to connect with
  • szDestHost - the length of pcDestHost.
  • pcSrcHost - host connected to the client
  • szSrcHost - the length of pcSrcHost.

Description

    If you agree to provide forwarding, set Access parameter to True. In order to provide client forwarding server has to establish connection with remote server and transfer the data received from the client to this server, and back from the remote server to the client.

Discuss this help topic in SecureBlackbox Forum