<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/node-new.git/src/stream_wrap.h, branch crypto_set_integer_macro</title>
<subtitle>github.com: nodejs/node.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/'/>
<entry>
<title>src: use JS inheritance for `AsyncWrap`</title>
<updated>2018-10-03T20:43:42+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2018-09-23T17:24:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=d527dde3600655eae7ce0ba5da9263ec4560cd11'/>
<id>d527dde3600655eae7ce0ba5da9263ec4560cd11</id>
<content type='text'>
For all classes descending from `AsyncWrap`, use JS inheritance
instead of manually adding methods to the individual classes.

This allows cleanup of some code around transferring handles
over IPC.

PR-URL: https://github.com/nodejs/node/pull/23094
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For all classes descending from `AsyncWrap`, use JS inheritance
instead of manually adding methods to the individual classes.

This allows cleanup of some code around transferring handles
over IPC.

PR-URL: https://github.com/nodejs/node/pull/23094
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: remove StreamBase::kFlagHasWritev</title>
<updated>2018-06-30T13:52:54+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2018-06-25T16:46:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=64a3fadf7192485197b9695b7bb2165c7e7d762d'/>
<id>64a3fadf7192485197b9695b7bb2165c7e7d762d</id>
<content type='text'>
Since libuv 1.21.0, pipes on Windows support `writev` on the
libuv side.

This allows for some simplification, and makes the `StreamBase`
API more uniform (multi-buffer `Write()` is always supported now,
including when used by other non-JS consumers like HTTP/2).

PR-URL: https://github.com/nodejs/node/pull/21527
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since libuv 1.21.0, pipes on Windows support `writev` on the
libuv side.

This allows for some simplification, and makes the `StreamBase`
API more uniform (multi-buffer `Write()` is always supported now,
including when used by other non-JS consumers like HTTP/2).

PR-URL: https://github.com/nodejs/node/pull/21527
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: remove extra `ReadStop()` call</title>
<updated>2018-06-30T13:51:40+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2018-06-25T17:19:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=a078521a6a9cede03208216d58d5af13e8406cbe'/>
<id>a078521a6a9cede03208216d58d5af13e8406cbe</id>
<content type='text'>
This is no longer necessary since libuv 1.21.0.

PR-URL: https://github.com/nodejs/node/pull/21528
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is no longer necessary since libuv 1.21.0.

PR-URL: https://github.com/nodejs/node/pull/21528
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: always call ReadStop() before Close()</title>
<updated>2018-05-10T12:15:18+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2018-03-24T22:12:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=2b3150466e5f4db841f5980cda32172555bdda15'/>
<id>2b3150466e5f4db841f5980cda32172555bdda15</id>
<content type='text'>
For libuv-backed streams, always explicitly stop reading before
closing the handle.

PR-URL: https://github.com/nodejs/node/pull/19377
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For libuv-backed streams, always explicitly stop reading before
closing the handle.

PR-URL: https://github.com/nodejs/node/pull/19377
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: store fd for libuv streams on Windows</title>
<updated>2018-05-10T12:15:17+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2018-03-17T21:34:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=63a84609fb24b245838f2d0838d5141d36f09f83'/>
<id>63a84609fb24b245838f2d0838d5141d36f09f83</id>
<content type='text'>
On Windows, we can't just look up a FD for libuv streams and
return it in `GetFD()`.
However, we do sometimes construct streams from their FDs;
in those cases, it should be okay to store the value on a class field.

PR-URL: https://github.com/nodejs/node/pull/19377
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On Windows, we can't just look up a FD for libuv streams and
return it in `GetFD()`.
However, we do sometimes construct streams from their FDs;
in those cases, it should be okay to store the value on a class field.

PR-URL: https://github.com/nodejs/node/pull/19377
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: refactor WriteWrap and ShutdownWraps</title>
<updated>2018-02-14T09:00:29+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2018-02-08T03:59:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=0e7b61229aa602e55c5fb034a63d7da97eecff3b'/>
<id>0e7b61229aa602e55c5fb034a63d7da97eecff3b</id>
<content type='text'>
Encapsulate stream requests more:

- `WriteWrap` and `ShutdownWrap` classes are now tailored to the
  streams on which they are used. In particular, for most streams
  these are now plain `AsyncWrap`s and do not carry the overhead
  of unused libuv request data.
- Provide generic `Write()` and `Shutdown()` methods that wrap
  around the actual implementations, and make *usage* of streams
  easier, rather than implementing; for example, wrap objects
  don’t need to be provided by callers anymore.
- Use `EmitAfterWrite()` and `EmitAfterShutdown()` handlers to
  call the corresponding JS handlers, rather than always trying
  to call them. This makes usage of streams by other C++ code
  easier and leaner.

Also fix up some tests that were previously not actually testing
asynchronicity when the comments indicated that they would.

PR-URL: https://github.com/nodejs/node/pull/18676
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Anatoli Papirovski &lt;apapirovski@mac.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Encapsulate stream requests more:

- `WriteWrap` and `ShutdownWrap` classes are now tailored to the
  streams on which they are used. In particular, for most streams
  these are now plain `AsyncWrap`s and do not carry the overhead
  of unused libuv request data.
- Provide generic `Write()` and `Shutdown()` methods that wrap
  around the actual implementations, and make *usage* of streams
  easier, rather than implementing; for example, wrap objects
  don’t need to be provided by callers anymore.
- Use `EmitAfterWrite()` and `EmitAfterShutdown()` handlers to
  call the corresponding JS handlers, rather than always trying
  to call them. This makes usage of streams by other C++ code
  easier and leaner.

Also fix up some tests that were previously not actually testing
asynchronicity when the comments indicated that they would.

PR-URL: https://github.com/nodejs/node/pull/18676
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Anatoli Papirovski &lt;apapirovski@mac.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: simplify handles for libuv streams</title>
<updated>2018-02-01T09:53:53+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2018-01-24T23:43:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=5898dc3d0c071a8e5135ba0a80565dd19d49cb32'/>
<id>5898dc3d0c071a8e5135ba0a80565dd19d49cb32</id>
<content type='text'>
Instead of passing along the handle object, just set it as a
property on the stream handle object and let the read handler
grab it from there.

PR-URL: https://github.com/nodejs/node/pull/18334
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Anatoli Papirovski &lt;apapirovski@mac.com&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of passing along the handle object, just set it as a
property on the stream handle object and let the read handler
grab it from there.

PR-URL: https://github.com/nodejs/node/pull/18334
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Anatoli Papirovski &lt;apapirovski@mac.com&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: refactor stream callbacks and ownership</title>
<updated>2018-02-01T09:53:26+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2018-01-08T00:14:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=7c4b09b24bbe7d6a8cbad256f47b30a101a909ea'/>
<id>7c4b09b24bbe7d6a8cbad256f47b30a101a909ea</id>
<content type='text'>
Instead of setting individual callbacks on streams and tracking
stream ownership through a boolean `consume_` flag, always have
one specific listener object in charge of a stream, and call
methods on that object rather than generic C-style callbacks.

PR-URL: https://github.com/nodejs/node/pull/18334
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Anatoli Papirovski &lt;apapirovski@mac.com&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of setting individual callbacks on streams and tracking
stream ownership through a boolean `consume_` flag, always have
one specific listener object in charge of a stream, and call
methods on that object rather than generic C-style callbacks.

PR-URL: https://github.com/nodejs/node/pull/18334
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Anatoli Papirovski &lt;apapirovski@mac.com&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: remove `HasWriteQueue()`</title>
<updated>2018-01-14T13:41:14+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2017-12-30T11:40:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=20f6aaee7308d5f426de11def6ad9de8848222f5'/>
<id>20f6aaee7308d5f426de11def6ad9de8848222f5</id>
<content type='text'>
Tests are passing without it, and this otherwise makes the
code harder to reason about because the `async` flag on the
write request object would not be set even though the callback
would still be pending.

PR-URL: https://github.com/nodejs/node/pull/18019
Reviewed-By: Anatoli Papirovski &lt;apapirovski@mac.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Tests are passing without it, and this otherwise makes the
code harder to reason about because the `async` flag on the
write request object would not be set even though the callback
would still be pending.

PR-URL: https://github.com/nodejs/node/pull/18019
Reviewed-By: Anatoli Papirovski &lt;apapirovski@mac.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net,src: refactor writeQueueSize tracking</title>
<updated>2017-12-18T14:58:02+00:00</updated>
<author>
<name>Anatoli Papirovski</name>
<email>apapirovski@mac.com</email>
</author>
<published>2017-12-11T22:55:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=d36e1b4fed57b34d93e70d3408d753e00b8ed754'/>
<id>d36e1b4fed57b34d93e70d3408d753e00b8ed754</id>
<content type='text'>
Currently, writeQueueSize is never used in C++ and barely used
within JS. Instead of constantly updating the value on the JS
object, create a getter that will retrieve the most up-to-date
value from C++.

For the vast majority of cases though, create a new prop on
Socket.prototype[kLastWriteQueueSize] using a Symbol. Use this
to track the current write size, entirely in JS land.

PR-URL: https://github.com/nodejs/node/pull/17650
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, writeQueueSize is never used in C++ and barely used
within JS. Instead of constantly updating the value on the JS
object, create a getter that will retrieve the most up-to-date
value from C++.

For the vast majority of cases though, create a new prop on
Socket.prototype[kLastWriteQueueSize] using a Symbol. Use this
to track the current write size, entirely in JS land.

PR-URL: https://github.com/nodejs/node/pull/17650
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
