Skip to content

ConnectionPool.default

km127pl edited this page Aug 13, 2023 · 1 revision

Class: default

ConnectionPool.default

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new default()

Properties

connections

Private Readonly connections: default[] = []

Defined in

ConnectionPool.ts:6

Methods

add

add(connection): void

Add a connection to the pool

Parameters

Name Type
connection default

Returns

void

Defined in

ConnectionPool.ts:12


disconnect

disconnect(id, reason?): Promise<boolean>

Disconnect a connection

Parameters

Name Type Description
id string The ID of the connection to disconnect
reason? string The reason for the disconnect

Returns

Promise<boolean>

Whether the connection was found and disconnected

Defined in

ConnectionPool.ts:43


disconnectAll

disconnectAll(reason?): Promise<boolean>

Disconnect all connections

Parameters

Name Type Description
reason? string The reason for the disconnect

Returns

Promise<boolean>

Whether all connections disconnected successfully

Defined in

ConnectionPool.ts:30


get

get(id): null | default

Get connection by ID

Parameters

Name Type Description
id string The ID of the connection to get

Returns

null | default

Defined in

ConnectionPool.ts:21

Clone this wiki locally