disconnect method
Initialize ws connection close by client.
When connection is successfully closed, onWsClosed
will be invoked.
Implementation
@override
Future<bool?> disconnect({
int code = 1000,
String reason = 'Client done.',
}) async {
return await WebSocketSupportPlatform.instance.disconnect(
code: code,
reason: reason,
);
}