I discovered that there is a problem in calling multiple uv_writes
using the SAME &write_req like the above example.
What happened is that the callback after_write get called infinitely
(endless loop).
Is it true that each uv_write() must be specified different uv_write_t,
and each uv_write_t variable must be valid until the callback is fired?
(thus, it is not dispose-able like uv_buf_t)
If that's true, then someone should insert an assertion there to catch on
the attempts to call uv_write with the same &write_req.
Also, please add that to the uv.h comments. Thanks.
Today, I spend all of my time just to understand these quirks -_-'
Felix Halim