-
Notifications
You must be signed in to change notification settings - Fork 0
ConnectionPool.default
km127pl edited this page Aug 13, 2023
·
1 revision
ConnectionPool.default
• new default()
• Private Readonly connections: default[] = []
▸ add(connection): void
Add a connection to the pool
| Name | Type |
|---|---|
connection |
default |
void
▸ disconnect(id, reason?): Promise<boolean>
Disconnect a connection
| Name | Type | Description |
|---|---|---|
id |
string |
The ID of the connection to disconnect |
reason? |
string |
The reason for the disconnect |
Promise<boolean>
Whether the connection was found and disconnected
▸ disconnectAll(reason?): Promise<boolean>
Disconnect all connections
| Name | Type | Description |
|---|---|---|
reason? |
string |
The reason for the disconnect |
Promise<boolean>
Whether all connections disconnected successfully
▸ get(id): null | default
Get connection by ID
| Name | Type | Description |
|---|---|---|
id |
string |
The ID of the connection to get |
null | default