closeSocket method

Future<void> closeSocket(
  1. dynamic url
)

Implementation

Future<void> closeSocket(url) async {
  return webSockets[url]?.sink.close().timeout(const Duration(seconds:3), onTimeout: () {
    print("timeout while trying to close socket $url");
  });
}