getSessionsForProxy method

List<ProxySession> getSessionsForProxy(
  1. Proxy proxy
)

Gets all sessions for a proxy

Implementation

List<ProxySession> getSessionsForProxy(Proxy proxy) {
  // Clean up old sessions
  _cleanupSessions();

  // Get all sessions for this proxy
  final proxyKey = '${proxy.host}:${proxy.port}';
  return _sessionsByProxy[proxyKey] ?? [];
}