### Hierarchy

- Socket
  - TLSSocket

### Implements

- ReadableStream
- Writable

## Index

### Constructors

- constructor

### Properties

- alpnProtocol
- authorizationError
- authorized
- bufferSize
- bytesRead
- bytesWritten
- connecting
- destroyed
- encrypted
- localAddress
- localPort
- readable
- readableHighWaterMark
- readableLength
- remoteAddress
- remoteFamily
- remotePort
- writable
- writableHighWaterMark
- writableLength
- defaultMaxListeners

### Methods

- __@asyncIterator
- _destroy
- _final
- _read
- _write
- _writev
- addListener
- address
- connect
- cork
- destroy
- emit
- end
- eventNames
- getCipher
- getMaxListeners
- getPeerCertificate
- getProtocol
- getSession
- getTLSTicket
- isPaused
- listenerCount
- listeners
- off
- on
- once
- pause
- pipe
- prependListener
- prependOnceListener
- push
- rawListeners
- read
- ref
- removeAllListeners
- removeListener
- renegotiate
- resume
- setDefaultEncoding
- setEncoding
- setKeepAlive
- setMaxListeners
- setMaxSendFragment
- setNoDelay
- setTimeout
- uncork
- unpipe
- unref
- unshift
- wrap
- write
- listenerCount

## Constructors

### constructor

- new TLSSocket(socket: Socket, options?: undefined | object): TLSSocket

- Overrides Socket.constructor

  - Defined in node_modules/@types/node/tls.d.ts:67

  Construct a new tls.TLSSocket object from an existing TCP socket.

  #### Parameters

  - ##### socket: Socket

  - ##### Optional options: undefined | object

  #### Returns TLSSocket

## Properties

### Optional alpnProtocol

alpnProtocol: undefined | string

- Defined in node_modules/@types/node/tls.d.ts:151

String containing the selected ALPN protocol. When ALPN has no selected protocol, tlsSocket.alpnProtocol equals false.

### authorizationError

authorizationError: Error

- Defined in node_modules/@types/node/tls.d.ts:140

The reason why the peer's certificate has not been verified. This property becomes available only when tlsSocket.authorized === false.

### authorized

authorized: boolean

- Defined in node_modules/@types/node/tls.d.ts:135

A boolean that is true if the peer certificate was signed by one of the specified CAs, otherwise false.

### bufferSize

bufferSize: number

Inherited from Socket.bufferSize

- Defined in node_modules/@types/node/net.d.ts:59

### bytesRead

bytesRead: number

Inherited from Socket.bytesRead

- Defined in node_modules/@types/node/net.d.ts:60

### bytesWritten

bytesWritten: number

Inherited from Socket.bytesWritten

- Defined in node_modules/@types/node/net.d.ts:61

### connecting

connecting: boolean

Inherited from Socket.connecting

- Defined in node_modules/@types/node/net.d.ts:62

### destroyed

destroyed: boolean

Inherited from Socket.destroyed

- Defined in node_modules/@types/node/net.d.ts:63

### encrypted

encrypted: boolean

- Defined in node_modules/@types/node/tls.d.ts:145

Static boolean value, always true. May be used to distinguish TLS sockets from regular ones.

### localAddress

localAddress: string

Inherited from Socket.localAddress

- Defined in node_modules/@types/node/net.d.ts:64

### localPort

localPort: number

Inherited from Socket.localPort

- Defined in node_modules/@types/node/net.d.ts:65

### readable

readable: boolean

Implementation of ReadableStream.readable

Inherited from Readable.readable

- Defined in node_modules/@types/node/stream.d.ts:20

### readableHighWaterMark

readableHighWaterMark: number

Inherited from Readable.readableHighWaterMark

- Defined in node_modules/@types/node/stream.d.ts:21

### readableLength

readableLength: number

Inherited from Readable.readableLength

- Defined in node_modules/@types/node/stream.d.ts:22

### Optional remoteAddress

remoteAddress: undefined | string

Inherited from Socket.remoteAddress

- Defined in node_modules/@types/node/net.d.ts:66

### Optional remoteFamily

remoteFamily: undefined | string

Inherited from Socket.remoteFamily

- Defined in node_modules/@types/node/net.d.ts:67

### Optional remotePort

remotePort: undefined | number

Inherited from Socket.remotePort

- Defined in node_modules/@types/node/net.d.ts:68

### writable

writable: boolean

Inherited from Duplex.writable

- Defined in node_modules/@types/node/stream.d.ts:207

### writableHighWaterMark

writableHighWaterMark: number

Inherited from Duplex.writableHighWaterMark

- Defined in node_modules/@types/node/stream.d.ts:208

### writableLength

writableLength: number

Inherited from Duplex.writableLength

- Defined in node_modules/@types/node/stream.d.ts:209

### Static defaultMaxListeners

defaultMaxListeners: number

Inherited from EventEmitter.defaultMaxListeners

- Defined in node_modules/@types/node/events.d.ts:8

## Methods

### __@asyncIterator

- __@asyncIterator(): AsyncIterableIterator<any>

- Implementation of ReadableStream.__@asyncIterator

  Inherited from Readable.__@asyncIterator

  - Defined in node_modules/@types/node/stream.d.ts:95

  #### Returns AsyncIterableIterator<any>

### _destroy

- _destroy(error: Error | null, callback: function): void

- Inherited from Duplex._destroy

  Overrides Readable._destroy

  - Defined in node_modules/@types/node/stream.d.ts:213

  #### Parameters

  - ##### error: Error | null

  - ##### callback: function

    - - (error: Error | null): void

      - #### Parameters

        - ##### error: Error | null

        #### Returns void

### _final

- _final(callback: function): void

- Inherited from Duplex._final

  - Defined in node_modules/@types/node/stream.d.ts:214

  #### Parameters

  - ##### callback: function

    - - (error?: Error | null): void

      - #### Parameters

        - ##### Optional error: Error | null

        #### Returns void

### _read

- _read(size: number): void

- Inherited from Readable._read

  - Defined in node_modules/@types/node/stream.d.ts:24

  #### Parameters

  - ##### size: number

  #### Returns void

### _write

- _write(chunk: any, encoding: string, callback: function): void

- Inherited from Duplex._write

  - Defined in node_modules/@types/node/stream.d.ts:211

  #### Parameters

  - ##### chunk: any

  - ##### encoding: string

  - ##### callback: function

    - - (error?: Error | null): void

      - #### Parameters

        - ##### Optional error: Error | null

        #### Returns void

### Optional _writev

- _writev(chunks: Array<object>, callback: function): void

- Inherited from Duplex._writev

  - Defined in node_modules/@types/node/stream.d.ts:212

  #### Parameters

  - ##### chunks: Array<object>

  - ##### callback: function

    - - (error?: Error | null): void

      - #### Parameters

        - ##### Optional error: Error | null

        #### Returns void

### addListener

- addListener(event: string, listener: function): this
- addListener(event: "OCSPResponse", listener: function): this
- addListener(event: "secureConnect", listener: function): this
- addListener(event: "session", listener: function): this

- Overrides Socket.addListener

  - Defined in node_modules/@types/node/tls.d.ts:219

  events.EventEmitter

  1. OCSPResponse
  2. secureConnect

  #### Parameters

  - ##### event: string

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

- Overrides Socket.addListener

  - Defined in node_modules/@types/node/tls.d.ts:220

  #### Parameters

  - ##### event: "OCSPResponse"

  - ##### listener: function

    - - (response: Buffer): void

      - #### Parameters

        - ##### response: Buffer

        #### Returns void

  #### Returns this

- Overrides Socket.addListener

  - Defined in node_modules/@types/node/tls.d.ts:221

  #### Parameters

  - ##### event: "secureConnect"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Overrides Socket.addListener

  - Defined in node_modules/@types/node/tls.d.ts:222

  #### Parameters

  - ##### event: "session"

  - ##### listener: function

    - - (session: Buffer): void

      - #### Parameters

        - ##### session: Buffer

        #### Returns void

  #### Returns this

### address

- address(): AddressInfo | string

- Inherited from Socket.address

  - Defined in node_modules/@types/node/net.d.ts:55

  #### Returns AddressInfo | string

### connect

- connect(options: SocketConnectOpts, connectionListener?: undefined | function): this
- connect(port: number, host: string, connectionListener?: undefined | function): this
- connect(port: number, connectionListener?: undefined | function): this
- connect(path: string, connectionListener?: undefined | function): this

- Inherited from Socket.connect

  - Defined in node_modules/@types/node/net.d.ts:44

  #### Parameters

  - ##### options: SocketConnectOpts

  - ##### Optional connectionListener: undefined | function

  #### Returns this

- Inherited from Socket.connect

  - Defined in node_modules/@types/node/net.d.ts:45

  #### Parameters

  - ##### port: number

  - ##### host: string

  - ##### Optional connectionListener: undefined | function

  #### Returns this

- Inherited from Socket.connect

  - Defined in node_modules/@types/node/net.d.ts:46

  #### Parameters

  - ##### port: number

  - ##### Optional connectionListener: undefined | function

  #### Returns this

- Inherited from Socket.connect

  - Defined in node_modules/@types/node/net.d.ts:47

  #### Parameters

  - ##### path: string

  - ##### Optional connectionListener: undefined | function

  #### Returns this

### cork

- cork(): void

- Inherited from Duplex.cork

  - Defined in node_modules/@types/node/stream.d.ts:221

  #### Returns void

### destroy

- destroy(error?: Error): void

- Inherited from Readable.destroy

  - Defined in node_modules/@types/node/stream.d.ts:35

  #### Parameters

  - ##### Optional error: Error

  #### Returns void

### emit

- emit(event: string | symbol, ...args: any[]): boolean
- emit(event: "OCSPResponse", response: Buffer): boolean
- emit(event: "secureConnect"): boolean
- emit(event: "session", session: Buffer): boolean

- Implementation of ReadableStream.emit

  Overrides Socket.emit

  - Defined in node_modules/@types/node/tls.d.ts:224

  #### Parameters

  - ##### event: string | symbol

  - ##### Rest ...args: any[]

  #### Returns boolean

- Overrides Socket.emit

  - Defined in node_modules/@types/node/tls.d.ts:225

  #### Parameters

  - ##### event: "OCSPResponse"

  - ##### response: Buffer

  #### Returns boolean

- Overrides Socket.emit

  - Defined in node_modules/@types/node/tls.d.ts:226

  #### Parameters

  - ##### event: "secureConnect"

  #### Returns boolean

- Overrides Socket.emit

  - Defined in node_modules/@types/node/tls.d.ts:227

  #### Parameters

  - ##### event: "session"

  - ##### session: Buffer

  #### Returns boolean

### end

- end(cb?: undefined | function): void
- end(buffer: Buffer | Uint8Array | string, cb?: undefined | function): void
- end(str: Buffer | Uint8Array | string, encoding?: undefined | string, cb?: undefined | function): void

- Inherited from Socket.end

  Overrides Duplex.end

  - Defined in node_modules/@types/node/net.d.ts:71

  #### Parameters

  - ##### Optional cb: undefined | function

  #### Returns void

- Inherited from Socket.end

  Overrides Duplex.end

  - Defined in node_modules/@types/node/net.d.ts:72

  #### Parameters

  - ##### buffer: Buffer | Uint8Array | string

  - ##### Optional cb: undefined | function

  #### Returns void

- Inherited from Socket.end

  Overrides Duplex.end

  - Defined in node_modules/@types/node/net.d.ts:73

  #### Parameters

  - ##### str: Buffer | Uint8Array | string

  - ##### Optional encoding: undefined | string

  - ##### Optional cb: undefined | function

  #### Returns void

### eventNames

- eventNames(): Array<string | symbol>

- Implementation of ReadableStream.eventNames

  Inherited from EventEmitter.eventNames

  Overrides EventEmitter.eventNames

  - Defined in node_modules/@types/node/events.d.ts:23

  #### Returns Array<string | symbol>

### getCipher

- getCipher(): CipherNameAndProtocol

- - Defined in node_modules/@types/node/tls.d.ts:158

  Returns an object representing the cipher name and the SSL/TLS protocol version of the current connection.

  #### Returns CipherNameAndProtocol

  Returns an object representing the cipher name and the SSL/TLS protocol version of the current connection.

### getMaxListeners

- getMaxListeners(): number

- Implementation of ReadableStream.getMaxListeners

  Inherited from EventEmitter.getMaxListeners

  Overrides EventEmitter.getMaxListeners

  - Defined in node_modules/@types/node/events.d.ts:19

  #### Returns number

### getPeerCertificate

- getPeerCertificate(detailed: true): DetailedPeerCertificate
- getPeerCertificate(detailed?: undefined | false): PeerCertificate
- getPeerCertificate(detailed?: undefined | false | true): PeerCertificate | DetailedPeerCertificate

- - Defined in node_modules/@types/node/tls.d.ts:168

  Returns an object representing the peer's certificate. The returned object has some properties corresponding to the field of the certificate. If detailed argument is true the full chain with issuer property will be returned, if false only the top certificate without issuer property. If the peer does not provide a certificate, it returns null or an empty object.

  #### Parameters

  - ##### detailed: true

    If true; the full chain with issuer property will be returned.

  #### Returns DetailedPeerCertificate

  An object representing the peer's certificate.

- - Defined in node_modules/@types/node/tls.d.ts:169

  #### Parameters

  - ##### Optional detailed: undefined | false

  #### Returns PeerCertificate

- - Defined in node_modules/@types/node/tls.d.ts:170

  #### Parameters

  - ##### Optional detailed: undefined | false | true

  #### Returns PeerCertificate | DetailedPeerCertificate

### getProtocol

- getProtocol(): string | null

- - Defined in node_modules/@types/node/tls.d.ts:178

  Returns a string containing the negotiated SSL/TLS protocol version of the current connection. The value `'unknown'` will be returned for connected sockets that have not completed the handshaking process. The value `null` will be returned for server sockets or disconnected client sockets. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_get_version.html for more information.

  #### Returns string | null

  negotiated SSL/TLS protocol version of the current connection

### getSession

- getSession(): Buffer | undefined

- - Defined in node_modules/@types/node/tls.d.ts:183

  Could be used to speed up handshake establishment when reconnecting to the server.

  #### Returns Buffer | undefined

  ASN.1 encoded TLS session or undefined if none was negotiated.

### getTLSTicket

- getTLSTicket(): Buffer | undefined

- - Defined in node_modules/@types/node/tls.d.ts:189

  NOTE: Works only with client TLS sockets. Useful only for debugging, for session reuse provide session option to tls.connect().

  #### Returns Buffer | undefined

  TLS session ticket or undefined if none was negotiated.

### isPaused

- isPaused(): boolean

- Implementation of ReadableStream.isPaused

  Inherited from Readable.isPaused

  - Defined in node_modules/@types/node/stream.d.ts:29

  #### Returns boolean

### listenerCount

- listenerCount(type: string | symbol): number

- Implementation of ReadableStream.listenerCount

  Inherited from EventEmitter.listenerCount

  Overrides EventEmitter.listenerCount

  - Defined in node_modules/@types/node/events.d.ts:24

  #### Parameters

  - ##### type: string | symbol

  #### Returns number

### listeners

- listeners(event: string | symbol): Function[]

- Implementation of ReadableStream.listeners

  Inherited from EventEmitter.listeners

  Overrides EventEmitter.listeners

  - Defined in node_modules/@types/node/events.d.ts:20

  #### Parameters

  - ##### event: string | symbol

  #### Returns Function[]

### off

- off(event: string | symbol, listener: function): this

- Inherited from EventEmitter.off

  Overrides EventEmitter.off

  - Defined in node_modules/@types/node/events.d.ts:16

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

### on

- on(event: string, listener: function): this
- on(event: "OCSPResponse", listener: function): this
- on(event: "secureConnect", listener: function): this
- on(event: "session", listener: function): this

- Overrides Socket.on

  - Defined in node_modules/@types/node/tls.d.ts:229

  #### Parameters

  - ##### event: string

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

- Overrides Socket.on

  - Defined in node_modules/@types/node/tls.d.ts:230

  #### Parameters

  - ##### event: "OCSPResponse"

  - ##### listener: function

    - - (response: Buffer): void

      - #### Parameters

        - ##### response: Buffer

        #### Returns void

  #### Returns this

- Overrides Socket.on

  - Defined in node_modules/@types/node/tls.d.ts:231

  #### Parameters

  - ##### event: "secureConnect"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Overrides Socket.on

  - Defined in node_modules/@types/node/tls.d.ts:232

  #### Parameters

  - ##### event: "session"

  - ##### listener: function

    - - (session: Buffer): void

      - #### Parameters

        - ##### session: Buffer

        #### Returns void

  #### Returns this

### once

- once(event: string, listener: function): this
- once(event: "OCSPResponse", listener: function): this
- once(event: "secureConnect", listener: function): this
- once(event: "session", listener: function): this

- Overrides Socket.once

  - Defined in node_modules/@types/node/tls.d.ts:234

  #### Parameters

  - ##### event: string

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

- Overrides Socket.once

  - Defined in node_modules/@types/node/tls.d.ts:235

  #### Parameters

  - ##### event: "OCSPResponse"

  - ##### listener: function

    - - (response: Buffer): void

      - #### Parameters

        - ##### response: Buffer

        #### Returns void

  #### Returns this

- Overrides Socket.once

  - Defined in node_modules/@types/node/tls.d.ts:236

  #### Parameters

  - ##### event: "secureConnect"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Overrides Socket.once

  - Defined in node_modules/@types/node/tls.d.ts:237

  #### Parameters

  - ##### event: "session"

  - ##### listener: function

    - - (session: Buffer): void

      - #### Parameters

        - ##### session: Buffer

        #### Returns void

  #### Returns this

### pause

- pause(): this

- Implementation of ReadableStream.pause

  Inherited from Socket.pause

  Overrides Readable.pause

  - Defined in node_modules/@types/node/net.d.ts:50

  #### Returns this

### pipe

- pipe<T>(destination: T, options?: undefined | object): T

- Inherited from internal.pipe

  - Defined in node_modules/@types/node/stream.d.ts:5

  #### Type parameters

  - #### T: WritableStream

  #### Parameters

  - ##### destination: T

  - ##### Optional options: undefined | object

  #### Returns T

### prependListener

- prependListener(event: string, listener: function): this
- prependListener(event: "OCSPResponse", listener: function): this
- prependListener(event: "secureConnect", listener: function): this
- prependListener(event: "session", listener: function): this

- Overrides Socket.prependListener

  - Defined in node_modules/@types/node/tls.d.ts:239

  #### Parameters

  - ##### event: string

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

- Overrides Socket.prependListener

  - Defined in node_modules/@types/node/tls.d.ts:240

  #### Parameters

  - ##### event: "OCSPResponse"

  - ##### listener: function

    - - (response: Buffer): void

      - #### Parameters

        - ##### response: Buffer

        #### Returns void

  #### Returns this

- Overrides Socket.prependListener

  - Defined in node_modules/@types/node/tls.d.ts:241

  #### Parameters

  - ##### event: "secureConnect"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Overrides Socket.prependListener

  - Defined in node_modules/@types/node/tls.d.ts:242

  #### Parameters

  - ##### event: "session"

  - ##### listener: function

    - - (session: Buffer): void

      - #### Parameters

        - ##### session: Buffer

        #### Returns void

  #### Returns this

### prependOnceListener

- prependOnceListener(event: string, listener: function): this
- prependOnceListener(event: "OCSPResponse", listener: function): this
- prependOnceListener(event: "secureConnect", listener: function): this
- prependOnceListener(event: "session", listener: function): this

- Overrides Socket.prependOnceListener

  - Defined in node_modules/@types/node/tls.d.ts:244

  #### Parameters

  - ##### event: string

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

- Overrides Socket.prependOnceListener

  - Defined in node_modules/@types/node/tls.d.ts:245

  #### Parameters

  - ##### event: "OCSPResponse"

  - ##### listener: function

    - - (response: Buffer): void

      - #### Parameters

        - ##### response: Buffer

        #### Returns void

  #### Returns this

- Overrides Socket.prependOnceListener

  - Defined in node_modules/@types/node/tls.d.ts:246

  #### Parameters

  - ##### event: "secureConnect"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Overrides Socket.prependOnceListener

  - Defined in node_modules/@types/node/tls.d.ts:247

  #### Parameters

  - ##### event: "session"

  - ##### listener: function

    - - (session: Buffer): void

      - #### Parameters

        - ##### session: Buffer

        #### Returns void

  #### Returns this

### push

- push(chunk: any, encoding?: undefined | string): boolean

- Inherited from Readable.push

  - Defined in node_modules/@types/node/stream.d.ts:33

  #### Parameters

  - ##### chunk: any

  - ##### Optional encoding: undefined | string

  #### Returns boolean

### rawListeners

- rawListeners(event: string | symbol): Function[]

- Implementation of ReadableStream.rawListeners

  Inherited from EventEmitter.rawListeners

  Overrides EventEmitter.rawListeners

  - Defined in node_modules/@types/node/events.d.ts:21

  #### Parameters

  - ##### event: string | symbol

  #### Returns Function[]

### read

- read(size?: undefined | number): any

- Implementation of ReadableStream.read

  Inherited from Readable.read

  - Defined in node_modules/@types/node/stream.d.ts:25

  #### Parameters

  - ##### Optional size: undefined | number

  #### Returns any

### ref

- ref(): void

- Inherited from Socket.ref

  - Defined in node_modules/@types/node/net.d.ts:57

  #### Returns void

### removeAllListeners

- removeAllListeners(event?: string | symbol): this

- Implementation of ReadableStream.removeAllListeners

  Inherited from EventEmitter.removeAllListeners

  Overrides EventEmitter.removeAllListeners

  - Defined in node_modules/@types/node/events.d.ts:17

  #### Parameters

  - ##### Optional event: string | symbol

  #### Returns this

### removeListener

- removeListener(event: "close", listener: function): this
- removeListener(event: "data", listener: function): this
- removeListener(event: "end", listener: function): this
- removeListener(event: "readable", listener: function): this
- removeListener(event: "error", listener: function): this
- removeListener(event: string | symbol, listener: function): this

- Inherited from Readable.removeListener

  Overrides EventEmitter.removeListener

  - Defined in node_modules/@types/node/stream.d.ts:88

  #### Parameters

  - ##### event: "close"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Inherited from Readable.removeListener

  Overrides EventEmitter.removeListener

  - Defined in node_modules/@types/node/stream.d.ts:89

  #### Parameters

  - ##### event: "data"

  - ##### listener: function

    - - (chunk: any): void

      - #### Parameters

        - ##### chunk: any

        #### Returns void

  #### Returns this

- Inherited from Readable.removeListener

  Overrides EventEmitter.removeListener

  - Defined in node_modules/@types/node/stream.d.ts:90

  #### Parameters

  - ##### event: "end"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Inherited from Readable.removeListener

  Overrides EventEmitter.removeListener

  - Defined in node_modules/@types/node/stream.d.ts:91

  #### Parameters

  - ##### event: "readable"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Inherited from Readable.removeListener

  Overrides EventEmitter.removeListener

  - Defined in node_modules/@types/node/stream.d.ts:92

  #### Parameters

  - ##### event: "error"

  - ##### listener: function

    - - (err: Error): void

      - #### Parameters

        - ##### err: Error

        #### Returns void

  #### Returns this

- Inherited from Readable.removeListener

  Overrides EventEmitter.removeListener

  - Defined in node_modules/@types/node/stream.d.ts:93

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

### renegotiate

- renegotiate(options: object, callback: function): undefined | boolean

- - Defined in node_modules/@types/node/tls.d.ts:201

  Initiate TLS renegotiation process.

  NOTE: Can be used to request peer's certificate after the secure connection has been established. ANOTHER NOTE: When running as the server, socket will be destroyed with an error after handshakeTimeout timeout.

  #### Parameters

  - ##### options: object

    The options may contain the following fields: rejectUnauthorized, requestCert (See tls.createServer() for details).

    - ##### Optional rejectUnauthorized?: undefined | false | true

    - ##### Optional requestCert?: undefined | false | true

  - ##### callback: function

    callback(err) will be executed with null as err, once the renegotiation is successfully completed.

    - - (err: Error | null): void

      - #### Parameters

        - ##### err: Error | null

        #### Returns void

  #### Returns undefined | boolean

  `undefined` when socket is destroy, `false` if negotiaion can't be initiated.

### resume

- resume(): this

- Implementation of ReadableStream.resume

  Inherited from Socket.resume

  Overrides Readable.resume

  - Defined in node_modules/@types/node/net.d.ts:51

  #### Returns this

### setDefaultEncoding

- setDefaultEncoding(encoding: string): this

- Inherited from Duplex.setDefaultEncoding

  - Defined in node_modules/@types/node/stream.d.ts:217

  #### Parameters

  - ##### encoding: string

  #### Returns this

### setEncoding

- setEncoding(encoding?: undefined | string): this

- Inherited from Socket.setEncoding

  Overrides Readable.setEncoding

  - Defined in node_modules/@types/node/net.d.ts:49

  #### Parameters

  - ##### Optional encoding: undefined | string

  #### Returns this

### setKeepAlive

- setKeepAlive(enable?: undefined | false | true, initialDelay?: undefined | number): this

- Inherited from Socket.setKeepAlive

  - Defined in node_modules/@types/node/net.d.ts:54

  #### Parameters

  - ##### Optional enable: undefined | false | true

  - ##### Optional initialDelay: undefined | number

  #### Returns this

### setMaxListeners

- setMaxListeners(n: number): this

- Implementation of ReadableStream.setMaxListeners

  Inherited from EventEmitter.setMaxListeners

  Overrides EventEmitter.setMaxListeners

  - Defined in node_modules/@types/node/events.d.ts:18

  #### Parameters

  - ##### n: number

  #### Returns this

### setMaxSendFragment

- setMaxSendFragment(size: number): boolean

- - Defined in node_modules/@types/node/tls.d.ts:212

  Set maximum TLS fragment size (default and maximum value is: 16384, minimum is: 512). Smaller fragment size decreases buffering latency on the client: large fragments are buffered by the TLS layer until the entire fragment is received and its integrity is verified; large fragments can span multiple roundtrips, and their processing can be delayed due to packet loss or reordering. However, smaller fragments add extra TLS framing bytes and CPU overhead, which may decrease overall server throughput.

  #### Parameters

  - ##### size: number

    TLS fragment size (default and maximum value is: 16384, minimum is: 512).

  #### Returns boolean

  Returns true on success, false otherwise.

### setNoDelay

- setNoDelay(noDelay?: undefined | false | true): this

- Inherited from Socket.setNoDelay

  - Defined in node_modules/@types/node/net.d.ts:53

  #### Parameters

  - ##### Optional noDelay: undefined | false | true

  #### Returns this

### setTimeout

- setTimeout(timeout: number, callback?: undefined | function): this

- Inherited from Socket.setTimeout

  - Defined in node_modules/@types/node/net.d.ts:52

  #### Parameters

  - ##### timeout: number

  - ##### Optional callback: undefined | function

  #### Returns this

### uncork

- uncork(): void

- Inherited from Duplex.uncork

  - Defined in node_modules/@types/node/stream.d.ts:222

  #### Returns void

### unpipe

- unpipe(destination?: WritableStream): this

- Implementation of ReadableStream.unpipe

  Inherited from Readable.unpipe

  - Defined in node_modules/@types/node/stream.d.ts:30

  #### Parameters

  - ##### Optional destination: WritableStream

  #### Returns this

### unref

- unref(): void

- Inherited from Socket.unref

  - Defined in node_modules/@types/node/net.d.ts:56

  #### Returns void

### unshift

- unshift(chunk: any): void

- Inherited from Readable.unshift

  - Defined in node_modules/@types/node/stream.d.ts:31

  #### Parameters

  - ##### chunk: any

  #### Returns void

### wrap

- wrap(oldStream: ReadableStream): this

- Implementation of ReadableStream.wrap

  Inherited from Readable.wrap

  - Defined in node_modules/@types/node/stream.d.ts:32

  #### Parameters

  - ##### oldStream: ReadableStream

  #### Returns this

### write

- write(buffer: Buffer | Uint8Array | string, cb?: undefined | function): boolean
- write(str: Buffer | Uint8Array | string, encoding?: undefined | string, cb?: undefined | function): boolean

- Inherited from Socket.write

  Overrides Duplex.write

  - Defined in node_modules/@types/node/net.d.ts:41

  #### Parameters

  - ##### buffer: Buffer | Uint8Array | string

  - ##### Optional cb: undefined | function

  #### Returns boolean

- Inherited from Socket.write

  Overrides Duplex.write

  - Defined in node_modules/@types/node/net.d.ts:42

  #### Parameters

  - ##### str: Buffer | Uint8Array | string

  - ##### Optional encoding: undefined | string

  - ##### Optional cb: undefined | function

  #### Returns boolean

### Static listenerCount

- listenerCount(emitter: EventEmitter, event: string | symbol): number

- Inherited from EventEmitter.listenerCount

  - Defined in node_modules/@types/node/events.d.ts:7
  deprecated

    since v4.0.0

  #### Parameters

  - ##### emitter: EventEmitter

  - ##### event: string | symbol

  #### Returns number

Generated using TypeDoc