Discuss this help topic in SecureBlackbox Forum


TElSFTPServer     See also     

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

This event is fired when TElSFTPServer needs more data


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

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

    property OnReceive: TSBSFTPServerReceiveEvent;
    TSBSFTPServerReceiveEvent = procedure(Sender : TObject; Buffer: pointer; MaxSize: integer; var Written: integer) of object;

    void get_OnReceive(TElSFTPServerReceiveEvent &pMethodOutResult, void * &pDataOutResult);
    void set_OnReceive(TElSFTPServerReceiveEvent pMethodValue, void * pDataValue);
    typedef void (SB_CALLBACK *TElSFTPServerReceiveEvent)(void * _ObjectData, TObjectHandle Sender, void * Buffer, int32_t MaxSize, int32_t &Written);

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

    TElSFTPServerReceiveEvent getOnReceive();
    void setOnReceive(TElSFTPServerReceiveEvent Value);
    TElSFTPServerReceiveEvent.Callback OnReceive = new TElSFTPServerReceiveEvent.Callback() {
        public void TElSFTPServerReceiveEventCallback(TObject Sender, byte[] Buffer, int MaxSize, TSBInteger 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 TElSFTPServer wants a new portion of encrypted data from the client. It's a good idea to call recv function inside this event handler.

You must handle this event in any case. There is no other way to pass the encrypted data from the client to TElSFTPServer besides this event!

See also:     OnSend    

Discuss this help topic in SecureBlackbox Forum