Join 4,000+ others and never miss out on new tips, tutorials, and more.
Latest version:
pecl install openswoole-22.1.2 | composer require openswoole/core:22.1.5
<?php OpenSwoole\Core\Coroutine\Pool\ClientPool->__construct($factory, $config, int $size = self::DEFAULT_SIZE, bool $heartbeat = false)
A factory class to create a new connection, it could be MysqliClientFactory
, PDOClientFactory
or RedisClientFactory
The config data that the factory class needs to create a new instance.
This size of connection pool, default size is 16.
Enable heartbeat or not.
Create a new ClientPool
with constructor function.