close method

  1. @override
Future<void> close()
override

Implementation

@override
Future<void> close() async {
  if (socket == null) {
    throw WCException("Connection already closed");
  }
  await socket!.sink.close();
  _onClose();
}