close method

Future<void> close({
  1. Duration timeout = const Duration(seconds: 10),
})

Closes the channel. Idempotent; safe to call after a remote close.

Implementation

Future<void> close({Duration timeout = const Duration(seconds: 10)}) async {
  if (_closed) return;
  _markClosed();
  await Bluebird.invoke("closeL2capChannel", (p) => p.closeL2capChannel(channelId), timeout: timeout);
}