Debian Codegraph @

lib/3rdParty/composer/symfony/http-client/Internal/NativeClientState.php

raw symbols SCIP
1 <?php
2
3 /*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <[email protected]>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Component\HttpClient\Internal;
13
14 /**
15 * Internal representation of the native client's state.
16 *
17 * @author Alexander M. Turek <[email protected]>
18 *
19 * @internal
20 */
21 final class NativeClientState extends ClientState
22 {
23 public int $id;
24 public int $maxHostConnections = \PHP_INT_MAX;
25 public int $responseCount = 0;
26 /** @var string[] */
27 public array $dnsCache = [];
28 public bool $sleep = false;
29 /** @var int[] */
30 public array $hosts = [];
31
32 public function __construct()
33 {
34 $this->id = random_int(\PHP_INT_MIN, \PHP_INT_MAX);
35 }
36
37 public function reset(): void
38 {
39 $this->responseCount = 0;
40 $this->dnsCache = [];
41 $this->hosts = [];
42 }
43 }