tls: doc-only deprecate new TLSSocket constructor#36711
tls: doc-only deprecate new TLSSocket constructor#36711jasnell wants to merge 1 commit intonodejs:masterfrom
Conversation
Fixes: nodejs#10555 Refs: nodejs#10846 The `new tls.TLSSocket()` constructor does not set up all of the necessary lifecycle management or event handlers necessary for proper use. The `tls.connect()` method really should be the way that all `tls.TLSSocket()` instances are created. This commit begins the eventual phasing out of the `new tls.TLSSocket()` constructor with a doc-only deprecation. Signed-off-by: James M Snell <jasnell@gmail.com>
|
How are we supposed to create an unconnected socket then? Why can't the "lifecycle management or event handlers" be done once the socket's |
|
Well, this is only a doc only deprecation for now so the current way continues to work. What I would suggest is needed is an additional api or option to connect that allows creating the unconnected socket. |
|
Given the lack of attention it appears there's no support for this yet. |
|
Sorry, I've been pretty busy lately. Maybe I'm missing things, but I'm initially -1 on this since |
Fixes: #10555
Refs: #10846
The
new tls.TLSSocket()constructor does not set up all of thenecessary lifecycle management or event handlers necessary for
proper use. The
tls.connect()method really should be the waythat all
tls.TLSSocket()instances are created. This commitbegins the eventual phasing out of the
new tls.TLSSocket()constructor with a doc-only deprecation.
Signed-off-by: James M Snell jasnell@gmail.com
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes