Class: TCPSocket
Extends
AsyncDisposable
Constructors
Constructor
new TCPSocket(
remoteAddress,remotePort,options?):TCPSocket
Parameters
remoteAddress
string
remotePort
number
options?
Returns
TCPSocket
Properties
closed
readonlyclosed:Promise<void>
opened
readonlyopened:Promise<TCPSocketOpenInfo>
Methods
close()
close():
void
Initiates close. Use closed to await full teardown.
The class is also async-disposable: at the end of an
await using s = new TCPSocket(...) scope the socket is closed and
closed is awaited.
Returns
void