stream_wrap: use `uv_try_write` where possible
authorFedor Indutny <fedor.indutny@gmail.com>
Tue, 28 Jan 2014 22:48:10 +0000 (02:48 +0400)
committerFedor Indutny <fedor.indutny@gmail.com>
Tue, 28 Jan 2014 22:49:03 +0000 (02:49 +0400)
commit9836a4eeda1e2d43aad0923f1f72b364792629bc
treef9a43115eaca3a49f83c910d20ea363bef3b2b29
parenteaf76648a6ba05932465fdb2478a16ca4b6c17a6
stream_wrap: use `uv_try_write` where possible

Use `uv_try_write` for string and buffer writes, thus avoiding to do
allocations and copying in some of the cases.
benchmark/net/tcp-raw-pipe.js
benchmark/net/tcp-raw-s2c.js
lib/net.js
src/env.h
src/stream_wrap.cc
src/stream_wrap.h
src/tls_wrap.cc
src/tls_wrap.h
test/simple/test-tcp-wrap-listen.js