File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -207,8 +207,14 @@ class StreamResource {
207
207
// `*bufs` and `*count` accordingly. This is a no-op by default.
208
208
// Return 0 for success and a libuv error code for failures.
209
209
virtual int DoTryWrite (uv_buf_t ** bufs, size_t * count);
210
- // Perform a write of data, and either call req_wrap->Done() when finished
211
- // and return 0, or return a libuv error code for synchronous failures.
210
+ // Initiate a write of data. If the write completes synchronously, return 0 on
211
+ // success (with bufs modified to indicate how much data was consumed) or a
212
+ // libuv error code on failure. If the write will complete asynchronously,
213
+ // return 0. When the write completes asynchronously, call req_wrap->Done()
214
+ // with 0 on success (with bufs modified to indicate how much data was
215
+ // consumed) or a libuv error code on failure. Do not call req_wrap->Done() if
216
+ // the write completes synchronously, that is, it should never be called
217
+ // before DoWrite() has returned.
212
218
virtual int DoWrite (WriteWrap* w,
213
219
uv_buf_t * bufs,
214
220
size_t count,
You can’t perform that action at this time.
0 commit comments