Discuss this help topic in SecureBlackbox Forum

TElHTTPSClient.OnDynamicDataNeeded

TElHTTPSClient     See also     


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


This event is fired when the data block for the POST or PUT request is to be provided.

Declaration

[C#/Java]
    event TSBHTTPDynamicDataNeededEvent OnDynamicDataNeeded;
    delegate void TSBHTTPDynamicDataNeededEvent(Object Sender, byte[] Buffer, int ToRead, ref int Read);

[VB.NET]
    Event OnDynamicDataNeeded As TSBHTTPDynamicDataNeededEvent
    Delegate Sub TSBHTTPDynamicDataNeededEvent(ByVal Sender As Object, ByVal Buffer As Byte(), ByVal ToRead As Integer, ByRef Read As Integer)

[Pascal]
    property OnDynamicDataNeeded : TSBHTTPDynamicDataNeededEvent;
    TSBHTTPDynamicDataNeededEvent = procedure( Sender: TObject; Buffer : ByteArray; ToRead : integer; var Read : integer ) of object;

[C++]
    void get_OnDynamicDataNeeded(TSBHTTPDynamicDataNeededEvent &pMethodOutResult, void * &pDataOutResult);
    void set_OnDynamicDataNeeded(TSBHTTPDynamicDataNeededEvent pMethodValue, void * pDataValue);
    typedef void (SB_CALLBACK *TSBHTTPDynamicDataNeededEvent)(void * _ObjectData, TObjectHandle Sender, const uint8_t pBuffer[], int32_t szBuffer, int32_t ToRead, int32_t &Read);

[PHP]
    TSBHTTPDynamicDataNeededEvent|callable|NULL get_OnDynamicDataNeeded()
    void set_OnDynamicDataNeeded(TSBHTTPDynamicDataNeededEvent|callable|NULL $Value)
    callable TSBHTTPDynamicDataNeededEvent(TObject $Sender, string $Buffer, integer $ToRead, integer &$Read)

Parameters

  • Buffer - the buffer to place the data to
  • ToRead - maximum number of bytes of data to be read into Buffer
  • Read - the number of bytes actually read
  • pBuffer -
  • szBuffer - the length of pcBuffer.

Description

    This event is fired when dynamic variants of POST and PUT methods are called to stream the data to the server. The event is called in loop to read the data as they become available for streaming and send the read chunks of data. The handler of the event should block if there's no data available at the moment, but it's expected later. Set Read to 0 to tell the component, that no more data is expected.

See also:     Post method     Put method    

Discuss this help topic in SecureBlackbox Forum