Hi, Aaron: Maybe you can use libeio, that's a threaded io library for blocking file access.
Best regards Tom On Sun, May 22, 2011 at 6:00 PM, <[email protected]> wrote: > Send libev mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of libev digest..." > > > Today's Topics: > > 1. libev beginner : need some advice (Aaron Boxer) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sat, 21 May 2011 22:25:45 -0400 > From: Aaron Boxer <[email protected]> > To: [email protected] > Subject: libev beginner : need some advice > Message-ID: <[email protected]> > Content-Type: text/plain; charset=ISO-8859-1 > > Hello! > > I would like to use libev for a streaming server I am writing. > > This is how everything is supposed to work: > > 1) client opens a TCP socket connection to server > 2) server receives connection > 3) client sends a list of images they would like > 4) server reads request > 5) server loops through all of the images > i) server reads image from NAS > ii) server processes image file meta data > iii) server sends image data to client > > I found sample code that allows me to read and write from the socket > using libev I/O events. > But, I am not sure how to handle the read from NAS and processing. > This could take some time. > And I don't want to block the server while this is happening. > > Should this be done in another thread, and have the thread send the > image data back to the client? > I was planning on using a thread pool. But, perhaps libev can support > a processing step without > blocking? > > Any ideas or help would be greatly appreciated! > > Thanks > Aaron > > > > ------------------------------ > > _______________________________________________ > libev mailing list > [email protected] > http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev > > End of libev Digest, Vol 43, Issue 5 > ************************************ > _______________________________________________ libev mailing list [email protected] http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev
