Description

Copier buffer limit property, in bytes.

During the read-write cycle, an intermediate storage buffer is used. By default it's zero -- unlimited and will grow as needed if Efl.Io.Copier.source provides data and Efl.Io.Copier.destination do not consume it (or if there is no Efl.Io.Copier.destination).

However when reading data from untrusted sources like network system memory can be exhausted by flooding the copier. In these cases using a buffer limit is recommended.

When the buffer limit is reached the copier will pause reading data from Efl.Io.Copier.source until Efl.Io.Copier.destination consumes it. If there is no Efl.Io.Copier.destination set, user should call Efl.Io.Copier.binbuf_steal to consume data and reset buffer usage.

Setting a buffer limit smaller than current Efl.Io.Copier.read_chunk_size will automatically change Efl.Io.Copier.read_chunk_size to the new buffer limit.

Since 1.19

Values

  • size - Defines a maximum buffer limit, or 0 to allow unlimited amount of bytes

Setter

Constructor-only property to set buffer limit. 0 is unlimited

Since 1.19

Signature

@property buffer_limit {
    get {
        values {
            size: size;
        }
    }
    set {
        values {
            size: size;
        }
    }
}

C signature

size_t efl_io_copier_buffer_limit_get(const Eo *obj);
void efl_io_copier_buffer_limit_set(Eo *obj, size_t size);

Implemented by

  • Efl.Io.Copier.buffer_limit