Swoole\ConnectionPool->__construct

4.x is outdated, please check the latest version 22.x


Latest version: pecl install openswoole-22.1.2

Declaration

<?php Swoole\ConnectionPool->__construct (callable $constructor, int $size = 64, ?string $proxy = null)

Parameters

constructor

A constructor function to create a new connection, it could be RedisConfig, PDOConfig or RedisConfig

size

This size of connection pool.

proxy

Optional proxy function

Return

Description

Create a new ConnectionPool with constructor function, pool size, optional proxy function.

Example

Last updated on August 31, 2022