Skip to main content

Class: TCPServerSocket

Extends​

  • AsyncDisposable

Constructors​

Constructor​

new TCPServerSocket(localAddress, options?): TCPServerSocket

Parameters​

localAddress​

string

options?​

TCPServerSocketOptions

Returns​

TCPServerSocket

Properties​

closed​

readonly closed: Promise<void>


opened​

readonly opened: Promise<TCPServerSocketOpenInfo>

Methods​

close()​

close(): void

Initiates close. Use closed to await full teardown.

Also async-disposable: at the end of an await using s = new TCPServerSocket(...) scope the listener is closed and closed is awaited.

Returns​

void