Discuss this help topic in SecureBlackbox Forum

TElSSLClass.OnReceive

TElSSLClass     See also     


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


This event is used to read the data from the socket

Declaration

[C#/Java]
    event TSBReceiveEvent OnReceive;
    delegate void TSBReceiveEvent(object Sender, ref byte[] Buffer, long MaxSize, out long Written);

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

[Pascal]
    property OnReceive: TSBReceiveEvent;
    TSBReceiveEvent = procedure(Sender: TObject; Buffer: pointer; MaxSize: longint; out Written: longint) of object;

[C++]
    void get_OnReceive(TSBReceiveEvent &pMethodOutResult, void * &pDataOutResult);
    void set_OnReceive(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_OnReceive()
    void set_OnReceive(TSBReceiveEvent|callable|NULL $Value)
    callable TSBReceiveEvent(TObject $Sender, TSBPointer|NULL $Buffer, integer $MaxSize, integer &$Written)

Parameters

  • Buffer - the buffer that should be filled with data which were read from the socket by the application
  • 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 were placed to the buffer

Description

    This event is fired by TElSSLClient/TElSSLServer when it needs to read some data from the socket. Usually this is caused by the call to DataAvailable method. The application should fill the Buffer with the amount of data no more than Length bytes and return the number of bytes written in Received parameter.

See also:     TElSSLClient.DataAvailable     TElSSLServer.DataAvailable     OnData    

Discuss this help topic in SecureBlackbox Forum