close method

Future<void> close()

Ends the connection.

Implementation

Future<void> close() async {
  _bundleKey?.fillRange(0, _bundleKey!.length, 0);
  await _subscription.cancel();
  _socket.destroy();
  if (!_closed) _done();
}