NativeClientState.php 880 B

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