close method
Stops the relay and disconnects every client.
Implementation
Future<void> close() async {
for (final socket in _clients.values.toList()) {
await socket.close();
}
_clients.clear();
await _server.close(force: true);
}
Stops the relay and disconnects every client.
Future<void> close() async {
for (final socket in _clients.values.toList()) {
await socket.close();
}
_clients.clear();
await _server.close(force: true);
}