closeAgent method

Future<void> closeAgent(
  1. String agentId
)

Force-closes an agent's live connection (network-drop simulation).

Implementation

Future<void> closeAgent(String agentId) async {
  final ws = _conns[agentId];
  if (ws != null) await ws.close();
}