Discuss this help topic in SecureBlackbox Forum

TElSimpleSFTPClient.OnReceive

TElSimpleSFTPClient     See also     


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


This event is fired when TElSimpleSFTPClient needs more data

Declaration

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

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

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

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

[PHP]
    TSSHReceiveEvent|callable|NULL get_OnReceive()
    void set_OnReceive(TSSHReceiveEvent|callable|NULL $Value)
    callable TSSHReceiveEvent(TObject $Sender, TSBPointer|NULL $Buffer, integer $MaxSize, integer &$Written)

Parameters

  • Buffer - The buffer where to put encrypted data
  • MaxSize - The maximal needed size of data (in bytes)
  • Written - The real size of data that was passed

Description

    This event is fired when TElSimpleSFTPClient wants a new portion of encrypted data from the server. It's a good idea to call recv function inside this event handler.

You must handle this event, if you don't use built-in sockets (see UseInternalSocket property). There is no other way to pass the encrypted data from then server to TElSimpleSFTPClient, besides this event.

See also:     UseInternalSocket     OnSend    

Discuss this help topic in SecureBlackbox Forum