Discuss this help topic in SecureBlackbox Forum

TElSFTPServer.OnExtendedRequest

TElSFTPServer     See also     


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


This event is fired when server receives non-standard request from client.

Declaration

[C#/Java]
    event TElSFTPServerExtendedRequestEvent OnExtendedRequest;
    delegate void TElSFTPServerExtendedRequestEvent(Object Sender, string Request, byte[] Buffer, int BufferOffset, int Size, System.IO.Stream Response, ref int ErrorCode, ref string Comment);

[VB.NET]
    Event OnExtendedRequest As TElSFTPServerExtendedRequestEvent
    Delegate Sub TElSFTPServerExtendedRequestEvent(ByVal Sender As Object, ByVal Request As String, ByVal Buffer As Byte(), ByVal BufferOffset As Integer, ByVal Size As Integer, ByVal Response As System.IO.Stream, ByRef ErrorCode As Integer, ByRef Comment As String)

[Pascal]
    property OnExtendedRequest : TSBSFTPServerExtendedRequestEvent
    
    TSBSFTPServerExtendedRequestEvent = procedure(Sender : TObject; const Request: string; Buffer : pointer; Size : integer; Response : TStream; var ErrorCode : integer; var Comment : string) of object;

[C++]
    void get_OnExtendedRequest(TElSFTPServerExtendedRequestEvent &pMethodOutResult, void * &pDataOutResult);
    void set_OnExtendedRequest(TElSFTPServerExtendedRequestEvent pMethodValue, void * pDataValue);
    typedef void (SB_CALLBACK *TElSFTPServerExtendedRequestEvent)(void * _ObjectData, TObjectHandle Sender, const char * pcRequest, int32_t szRequest, void * Buffer, int32_t Size, TStreamHandle Response, int32_t &ErrorCode, char * pcComment, int32_t &szComment);

[PHP]
    TElSFTPServerExtendedRequestEvent|callable|NULL get_OnExtendedRequest()
    void set_OnExtendedRequest(TElSFTPServerExtendedRequestEvent|callable|NULL $Value)
    callable TElSFTPServerExtendedRequestEvent(TObject $Sender, string $Request, TSBPointer|NULL $Buffer, integer $Size, TStream $Response, integer &$ErrorCode, string &$Comment)

Parameters

  • Request - custom request name
  • Buffer - buffer with the request data
  • BufferOffset - start position in the Buffer
  • Size - request size in bytes
  • Response - stream to which the handler must wtite the response to the request
  • ErrorCode - the error code, see values below
  • Comment - server comment
  • pcRequest - custom request name
  • szRequest - the length of pcRequest.
  • pcComment - server comment
  • szComment - the length of pcComment.

Error codes


Description

    This event is fired when client sends non-standard request. The application can return the error code in ErrorCode parameter and textual comment in Comment parameter.

See also:     OnRequestAbsolutePath     OnRequestAttributes     OnRequestAttributes2    

Discuss this help topic in SecureBlackbox Forum