close method
Closes all active connections.
Implementation
Future<void> close() async {
for (final socket in _connections.values) {
await socket.close();
}
_connections.clear();
await server?.close();
server = null;
}
Closes all active connections.
Future<void> close() async {
for (final socket in _connections.values) {
await socket.close();
}
_connections.clear();
await server?.close();
server = null;
}