private NativeClientState
$multi;
/**
* @param array $defaultOptions Default request's options
* @param int $maxHostConnections The maximum number of connections to open
*
* @see HttpClientInterface::OPTIONS_DEFAULTS for available options
*/
public function __construct(array
$defaultOptions =
[], int
$maxHostConnections = 6
) { $this->defaultOptions
['buffer'
] ??= self::
shouldBuffer(...
);
if ($defaultOptions) { [,
$this->defaultOptions
] = self::
prepareRequest(null, null,
$defaultOptions,
$this->defaultOptions
);
} $this->multi =
new NativeClientState();
$this->multi->maxHostConnections = 0 <
$maxHostConnections ?
$maxHostConnections : \PHP_INT_MAX;
} /**
* @see HttpClientInterface::OPTIONS_DEFAULTS for available options
*/