socket{net.Socket|stream.Duplex} On the server side, anyDuplexstream. On the client side, any instance of [net.Socket][] (for genericDuplexstream support on the client side, [tls.connect()][] must be used).options{Object}enableTrace: See [tls.createServer()][]isServer: The SSL/TLS protocol is asymmetrical, TLSSockets must know if they are to behave as a server or a client. Iftruethe TLS socket will be instantiated as a server. Default:false.server{net.Server} A [net.Server][] instance.requestCert: Whether to authenticate the remote peer by requesting a certificate. Clients always request a server certificate. Servers (isServeris true) may setrequestCertto true to request a client certificate.rejectUnauthorized: See [tls.createServer()][]ALPNProtocols: See [tls.createServer()][]SNICallback: See [tls.createServer()][]session{Buffer} ABufferinstance containing a TLS session.requestOCSP{boolean} Iftrue, specifies that the OCSP status request extension will be added to the client hello and an'OCSPResponse'event will be emitted on the socket before establishing a secure communicationsecureContext: TLS context object created with [tls.createSecureContext()][]. If asecureContextis not provided, one will be created by passing the entireoptionsobject totls.createSecureContext().- …: [
tls.createSecureContext()][] options that are used if thesecureContextoption is missing. Otherwise, they are ignored.
Construct a new tls.TLSSocket object from an existing TCP socket.
