Hi, I am working on libev few days, and there is a question about EV_WRITE:
When processed request from client, the server has some data to write back. At
this time, it can:
A. write back directly in a loop, until all data has been written
B. install a EV_WRITE event when client connected, check buffer in the callback
function, and write back if there is data. The EV_WRITE event only install once.
C.install/start a EV_WRITE event when adding reply data to buffer, and in
callback function write all data to client, stop EV_WRITE event at last before
returning from this function.
Which one is best? How frequent the callback function will be called in
situation B?
Thanks in advance!
Kyle Qian
_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev