close method

Future<void> close()

Closes every connection with 1001 and stops the timers.

Implementation

Future<void> close() async {
  for (final c in _open) {
    c.patchTimer?.cancel();
    c.open = false;
    await c.socket.close(1001);
  }
}