disconnect method

  1. @override
Future<bool?> disconnect({
  1. int code = 1000,
  2. String reason = 'Client done.',
})
override

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.'}) {
  return _methodChannel.invokeMethod<bool>(
    'disconnect',
    <String, Object>{
      'code': code,
      'reason': reason,
    },
  );
}