Discuss this help topic in SecureBlackbox Forum

TElSSHServer.OnServerForwardingRequest

TElSSHServer     See also     


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


This event is fired when the client requests server forwarding.

Declaration

[C#]
    event TSSHServerForwardingRequestEvent OnServerForwardingRequest;
    delegate void TSSHServerForwardingRequestEvent(Object Sender, string Address, int Port, ref bool Accept, ref int RealPort);

[VB.NET]
    Event OnServerForwardingRequest As TSSHServerForwardingRequestEvent
    Delegate Sub TSSHServerForwardingRequestEvent(ByVal Sender As Object, ByVal Address As String, ByVal Port As Integer, ByRef Accept As Boolean, ByRef RealPort As Integer)

[Pascal]
    property OnServerForwardingRequest: TSSHServerForwardingRequestEvent;
    TSSHServerForwardingRequestEvent = procedure(Sender: TObject; const Address: string; Port : integer; var Accept : boolean; var RealPort: integer) of object;

[C++]
    void get_OnServerForwardingRequest(TSSHServerForwardingRequestEvent &pMethodOutResult, void * &pDataOutResult);
    void set_OnServerForwardingRequest(TSSHServerForwardingRequestEvent pMethodValue, void * pDataValue);
    typedef void (SB_CALLBACK *TSSHServerForwardingRequestEvent)(void * _ObjectData, TObjectHandle Sender, const char * pcAddress, int32_t szAddress, int32_t Port, int8_t &Accept, int32_t &RealPort);

[PHP]
    TSSHServerForwardingRequestEvent|callable|NULL get_OnServerForwardingRequest()
    void set_OnServerForwardingRequest(TSSHServerForwardingRequestEvent|callable|NULL $Value)
    callable TSSHServerForwardingRequestEvent(TObject $Sender, string $Address, integer $Port, bool &$Accept, integer &$RealPort)

[Java]
    TSSHServerForwardingRequestEvent getOnServerForwardingRequest();
    void setOnServerForwardingRequest(TSSHServerForwardingRequestEvent Value);
    TSSHServerForwardingRequestEvent.Callback OnServerForwardingRequest = new TSSHServerForwardingRequestEvent.Callback() {
        public void TSSHServerForwardingRequestEventCallback(TObject Sender, String Address, int Port, TSBBoolean Accept, TSBInteger RealPort) {
            //...
        }
    }

Parameters

  • Address - the address (network interface) on which the port must be bound (for instance "0.0.0.0")
  • Port - port to be bound
  • Accept - specifies if this forwarding should be allowed
  • RealPort - should be set to the port number, which was bound in fact
  • pcAddress - the address (network interface) on which the port must be bound (for instance "0.0.0.0")
  • szAddress - the length of pcAddress.

Description

    This event is fired on client's request for server forwarding. If Accept parameter is set to True the server allows this forwarding and undertakes to:
    a) open the Port for listening;
    b) if some remote host connects to this port, call OpenServerForwarding method and pass this host coordinates (SrcHost, SrcPort) to it.

Discuss this help topic in SecureBlackbox Forum