And finally it works! https://git.enlightenment.org/core/efl.git/log/?h=devs/barbieri/efl-io-interfaces
you can see the example is able to transparently copy from stdin to stdout/stderr, it can copy to/from files... without any special code in the example itself. That is, when I add Efl.Net, we can copy to/from some socket, be it TCP, UDP or even an URL created with libcurl as backend. Raster, take a look and see that the events you want, such as "data" (analogous to ECORE_CON_*_DATA events) or "line" are emitted there. This is particularly interesting for ease of use, debug and support of legacy APIs. On Mon, Aug 15, 2016 at 2:35 AM, Gustavo Sverzut Barbieri <barbi...@gmail.com> wrote: > Hi all, > > Updated with more details, Efl.Io.Copier and Efl.Io.File are mostly > done (although untested -- will focus on these tomorrow). I should add > some simple subclasses from these Efl.Io to help testing, like Stdin, > Stdout, Stderr, Null (/dev/null-like) and Zero (/dev/zero-like). > > As you can see in Efl.Io.Copier, it's the one doing "data" events like > Ecore_Con and Ecore_Con_URL did, but in a general way so whatever > implements the Efl.Io.Reader interface could do those (my plan is to > use a discard output like Efl.Io.Null to get the same effect). It is > doing line-buffered output as well, with configurable multibyte binary > delimiter. > > > > On Sat, Aug 13, 2016 at 5:05 AM, Gustavo Sverzut Barbieri > <barbi...@gmail.com> wrote: >> Hi all, >> >> Following the discussions from Eina_Slice and Efl.Io interfaces, I've >> started to code as you can see at: >> >> >> https://git.enlightenment.org/core/efl.git/log/?h=devs/barbieri/efl-io-interfaces >> >> I'll keep following with my preferences of Eina_Slice (instead of >> Eina_Binbuf) and fine-grained Efl.Io.* interfaces (instead of a single >> one that does all operations). It's a bit more work, but it's easier >> to sed & fix compiler errors if we decide to go in the other >> direction. >> >> The code compiles, but I did not test the new objects yet. With the >> existing code (if it works) it would fulfill memory<->file cases. >> >> Then it would be a matter of adding Efl.Net.Socket based on >> Efl.Io.*.Fd that makes sense (ie: reader, writer, closer). It would be >> about implementing finalize for Dialers (or an explicit connect() as >> requested by raster). >> >> For Efl.Net.Http.Client (ecore_con_url), it would also expose Efl.Io.* >> interfaces, but since cURL handles the actual fd, it would not be >> based on Efl.Io.*.Fd. But to the end user, the expected reader, >> writer, closer will all work like expected, being able to use >> Efl.Io.Copier on them to download/upload stuff to/from files or >> memory. >> >> BR, >> >> -- >> Gustavo Sverzut Barbieri >> -------------------------------------- >> Mobile: +55 (16) 99354-9890 > > > > -- > Gustavo Sverzut Barbieri > -------------------------------------- > Mobile: +55 (16) 99354-9890 -- Gustavo Sverzut Barbieri -------------------------------------- Mobile: +55 (16) 99354-9890 ------------------------------------------------------------------------------ _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel