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

Reply via email to