Discuss this help topic in SecureBlackbox Forum

TElFTPSServer.OnTransferDataNeeded

TElFTPSServer     See also     


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


This event is fired when server needs to transfer data to client.

Declaration

[C#]
    event TSBReceiveEvent OnTransferDataNeeded;
    delegate void TSBReceiveEvent(Object Sender, ref byte[] Buffer, int MaxSize, out int Written);

[VB.NET]
    Event OnTransferDataNeeded As TSBReceiveEvent
    Delegate Sub TSBReceiveEvent(ByVal Sender As Object, ByRef Buffer As Byte(), ByVal MaxSize As Integer, Out Written As Integer)

[Pascal]
    property OnTransferDataNeeded : TSBReceiveEvent;
    TSBReceiveEvent = procedure (Sender: TObject; Buffer : Pointer; MaxSize : LongInt; out Written : LongInt) of object;

[C++]
    void get_OnTransferDataNeeded(TSBReceiveEvent &pMethodOutResult, void * &pDataOutResult);
    void set_OnTransferDataNeeded(TSBReceiveEvent pMethodValue, void * pDataValue);
    typedef void (SB_CALLBACK *TSBReceiveEvent)(void * _ObjectData, TObjectHandle Sender, void * Buffer, int32_t MaxSize, int32_t &Written);

[PHP]
    TSBReceiveEvent|callable|NULL get_OnTransferDataNeeded()
    void set_OnTransferDataNeeded(TSBReceiveEvent|callable|NULL $Value)
    callable TSBReceiveEvent(TObject $Sender, TSBPointer|NULL $Buffer, integer $MaxSize, integer &$Written)

[Java]
    TSBReceiveEvent getOnTransferDataNeeded();
    void setOnTransferDataNeeded(TSBReceiveEvent Value);
    TSBReceiveEvent.Callback OnTransferDataNeeded = new TSBReceiveEvent.Callback() {
        public void TSBReceiveEventCallback(TObject Sender, byte[] Buffer, int MaxSize, TSBInteger Written) {
            //...
        }
    }

Parameters

  • Buffer - the buffer that should be filled with data.
  • MaxSize - the length of the buffer. Specifies the maximum number of bytes that can be written to the buffer.
  • Written - the amount of data that was placed to the buffer.

Description

    This event is fired by TElFTPSServer when it needs to transfer data to client (for example, when a file on the server should be read). The application should fill the Buffer with the amount of data not more than MaxSize bytes and return the number of bytes written in Written parameter.

See also:     OnDataReceive     OnTransferDataAvailable     OnTransferProgress     OnTransferCompleted    

Discuss this help topic in SecureBlackbox Forum