1.4 KiB
1.4 KiB
The taClient.disconnect() method
This documents the taClient.disconnect() method.
info
Async: This is a method you would want to use await with
This method has input parameters. The function could easily be defined as:
async function disconnect(): Promise<Response> {
// backend logic
}
General usage:
const response: Response = taClient.disconnect();
- For
Responseplease find documentation at Models -> Response
If you have not yet, please read Client -> Introduction to the Client
Standard Response:
{
details: {
disconnect: Response_Disconnect,
oneofKind: 'disconnect'
},
respondingToPacketId: 'packet-guid-uuidv4',
type: Response_ResponseType
}
- For
Response_Disconnectplease find documentation at Models -> Response_Disconnect.
info
Best Practice: Always call disconnect() when your application is shutting down or when the user logs out. This ensures that all event listeners are properly cleaned up and the connection is gracefully terminated.