Discuss this help topic in SecureBlackbox Forum

TElFTPSServer.OnVirtualHostRequest

TElFTPSServer     


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


Handle this event if you need the server to support HOST command.

Declaration

[C#]
    event TSBFTPSServerHostRequestEvent OnVirtualHostRequest;
    delegate void TSBFTPSServerHostRequestEvent(Object Sender, string Host, ref int ErrorCode);

[VB.NET]
    Event OnVirtualHostRequest As TSBFTPSServerHostRequestEvent
    Delegate Sub TSBFTPSServerHostRequestEvent(ByVal Sender As Object, ByVal Host As String, ByRef ErrorCode As Integer)

[Pascal]
    property OnVirtualHostRequest : TSBFTPSServerHostRequestEvent;
    TSBFTPSServerHostRequestEvent = procedure(Sender : TObject; const Host : string; var ErrorCode : word) of object;

[C++]
    void get_OnVirtualHostRequest(TSBFTPSServerHostRequestEvent &pMethodOutResult, void * &pDataOutResult);
    void set_OnVirtualHostRequest(TSBFTPSServerHostRequestEvent pMethodValue, void * pDataValue);
    typedef void (SB_CALLBACK *TSBFTPSServerHostRequestEvent)(void * _ObjectData, TObjectHandle Sender, const char * pcHost, int32_t szHost, int32_t &ErrorCode);

[PHP]
    TSBFTPSServerHostRequestEvent|callable|NULL get_OnVirtualHostRequest()
    void set_OnVirtualHostRequest(TSBFTPSServerHostRequestEvent|callable|NULL $Value)
    callable TSBFTPSServerHostRequestEvent(TObject $Sender, string $Host, integer &$ErrorCode)

[Java]
    TSBFTPSServerHostRequestEvent getOnVirtualHostRequest();
    void setOnVirtualHostRequest(TSBFTPSServerHostRequestEvent Value);
    TSBFTPSServerHostRequestEvent.Callback OnVirtualHostRequest = new TSBFTPSServerHostRequestEvent.Callback() {
        public void TSBFTPSServerHostRequestEventCallback(TObject Sender, String Host, TSBInteger ErrorCode) {
            //...
        }
    }

Parameters

  • Host - specifies the virtual host name.
  • ErrorCode - the server return code.
  • pcHost - specifies the virtual host name.
  • szHost - the length of pcHost.

Description

    The event handler should return error code 220 if the virtual host is OK, or the error code 504 if the host is not recognized.

Discuss this help topic in SecureBlackbox Forum