On Sat, Jun 25, 2011 at 07:25:56PM -0400, Aaron Boxer <[email protected]> wrote:
> Is it appropriate to use a libev write callback
> to call sendfile? Or is it better to use libeio sendfile support?

* sendfile replaces read + write

* libeio sendfile replaces
  libeio read + libeio write (blocking)
  or
  libeio read + write (non-blocking)

so if you are replacing a blocking disk-read, then sendfile is
appropriate. if you are replacing an async disk read, libeio sendfile is
appropriate.

> 3) file read (libeio)
> 
> Step 3 is needed to calculate the file offsets required by sendfile.

I doubt it.

> I suppose if I used libeio for step 4, I wouldn't need to integrate
> libeio into the libev event loop.

Depends on how you do result processing.

> Just not sure which lib is the most appropriate here.

Since you already rely on libeio in your workflow, it is an appropriate lib
for your workflow :) libev probably, too, unless you use another event loop,
or threads/fork, to do your accept thing.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      [email protected]
      -=====/_/_//_/\_,_/ /_/\_\

_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

Reply via email to