Commit Graph

10 Commits

Author SHA1 Message Date
Gustavo Sverzut Barbieri 16be61c7e1 efl_io_copier_flush: add may_block and ignore_line_delimiter parameters.
The may_block parameter is useful to force a flush without blocking on
read/write, sometimes particularly useful if ignore_line_delimiter is
true, then you get the data events without blocking -- as if a server
sending some content misses a trailing line delimiter, you do not want
to block on recv() but still want to flush data to user.

The ignore_line_delimiter parameter is useful if we're going to close
the copier and want to flush pending data which may exist due missing
trailing terminator. The close method will also force that if
destination can take more data.
2016-11-25 17:25:18 -02:00
Gustavo Sverzut Barbieri d9dafab785 efl_io_copier: expose 'done' property.
This property has a protected setter and will simplify both internal
implementation as well as usage.
2016-11-25 17:25:18 -02:00
Gustavo Sverzut Barbieri 4b28d5a989 docs: enhance efl_io_copier.
This is the core component of our new I/O subsystem, heavily used by
efl.net and the likes. Then make sure the documentation is good :-)
2016-11-24 15:22:45 -02:00
Stefan Schmidt d859d693be docs: efl_io_copier: fill gaps in eo file documentation 2016-11-24 15:33:10 +01:00
Gustavo Sverzut Barbieri 5c961bba9b efl_io_copier: add flush method.
This method will force a read-write cycle and returns if it's fully
done or not. It may be used to force data to be written before a
handle is deleted (when one can't wait for the data to be written
asynchronously).
2016-11-23 12:57:10 -02:00
Stefan Schmidt 6a322b1b2c docs: ecore: finish up eo file docs in ecore 2016-11-11 10:58:22 +01:00
Daniel Kolesa 54ad4f24d2 efl_io_copier: remove pointers 2016-11-03 17:02:24 +01:00
Gustavo Sverzut Barbieri 5e54c3aa57 efl_io_copier: add inactivity_timeout.
This is handful to error the copier with ETIMEDOUT if there are no
reads or writes in the given amount of time.

Since copiers are usable to download data or handle network clients,
it's easy to set a timeout and disconnect, let's say UDP clients that
are gone.
2016-10-22 10:52:22 -02:00
Gustavo Sverzut Barbieri ea7bc821d5 efl_io_closer: add close_on_exec and close_on_destructor properties.
the purpose of these properties are to make it more uniform the
handling of these auto-close behavior.
2016-09-12 13:18:28 -03:00
Gustavo Sverzut Barbieri 5d4688679e efl.io: introduce basic interfaces and classes.
These interfaces allows generic operations on objects that can store
or provide data, such as a file or a buffer.

With well defined interfaces and events we can create code such as
Efl.Io.Copier, that will link a source with a destination and
progressively copy data as they appear.
2016-08-22 18:25:14 -03:00