Discuss this help topic in SecureBlackbox Forum


TElSimpleSFTPClient     See also     

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

This event is fired when TElSimpleSFTPClient needs more data


    event TSSHReceiveEvent OnReceive;
    delegate void TSSHReceiveEvent(Object Sender, ref byte[] Buffer, int MaxSize, out int Written);

    Event OnReceive As TSSHReceiveEvent
    Delegate Sub TSSHReceiveEvent(ByVal Sender As Object, ByRef Buffer As Byte(), ByVal MaxSize As Integer, Out Written As Integer)

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

    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);

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


  • 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


    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