asynchronous socket writing

Jonas H. jonas at lophus.org
Wed Mar 10 19:15:16 CET 2010


Hello there,

   I'm currently taking my first steps in socket/C programming and I 
want to implement a fast, multi-threaded web server for testing purpose. 
  I decided to have a single accept/listen/whatever thread for now. 
However, I want asynchronous read at write (at least write).

   So the question is: How do I implemented asynchronous I/O?
(Maybe this isn't /too/ libev specific but more a general question.)

   If I get things right, the UNIX `read`/`recv` and `write`/`send` 
aren't non-blocking/asynchronous. Putting the write stuff into an own 
thread does not change anything.  Did I get something wrong?

I'm grateful for any tips. Thanks! :-)

     Jonas



More information about the libev mailing list