Skip to main content

Class: TLSSocket

A TLS client socket. Wraps a TCP connection with TLS encryption. All data read from the readable stream and written to the writable stream is automatically encrypted/decrypted — JS only sees plaintext.

Constructors

Constructor

new TLSSocket(remoteAddress, remotePort, options?): TLSSocket

Parameters

remoteAddress

string

remotePort

number

options?

TLSSocketOptions

Returns

TLSSocket

Properties

closed

readonly closed: Promise<void>


opened

readonly opened: Promise<TLSSocketOpenInfo>

Methods

close()

close(): void

Returns

void