Discuss this help topic in SecureBlackbox Forum

TElSimpleSFTPClient.OnReceive

TElSimpleSFTPClient     See also     


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


This event is fired when TElSimpleSFTPClient needs more data

Declaration

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

[VB.NET]
    Event OnReceive As TSSHReceiveEvent
    Delegate Sub TSSHReceiveEvent(ByVal Sender As Object, ByRef Buffer As Byte(), ByVal MaxSize As Integer, Out 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)

[Java]
    TSSHReceiveEvent getOnReceive();
    void setOnReceive(TSSHReceiveEvent Value);
    TSSHReceiveEvent.Callback OnReceive = new TSSHReceiveEvent.Callback() {
        public void TSSHReceiveEventCallback(TObject Sender, byte[] Buffer, int MaxSize, TSBInteger 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 is 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