diff options
author | Fedor Indutny <fedor.indutny@gmail.com> | 2014-01-29 02:48:10 +0400 |
---|---|---|
committer | Fedor Indutny <fedor.indutny@gmail.com> | 2014-01-29 02:49:03 +0400 |
commit | 9836a4eeda1e2d43aad0923f1f72b364792629bc (patch) | |
tree | f9a43115eaca3a49f83c910d20ea363bef3b2b29 /src/stream_wrap.h | |
parent | eaf76648a6ba05932465fdb2478a16ca4b6c17a6 (diff) |
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.
Diffstat (limited to 'src/stream_wrap.h')
-rw-r--r-- | src/stream_wrap.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/stream_wrap.h b/src/stream_wrap.h index d1a94fb422f..f91bb8ba55f 100644 --- a/src/stream_wrap.h +++ b/src/stream_wrap.h @@ -74,6 +74,9 @@ class StreamWrapCallbacks { } virtual const char* Error(); + + virtual int TryWrite(uv_buf_t** bufs, size_t* count); + virtual int DoWrite(WriteWrap* w, uv_buf_t* bufs, size_t count, |