Swoole\Coroutine\FastCGI\Client->construct(...)

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


Latest version: pecl install openswoole-22.1.2

Declaration

<?php Swoole\Coroutine\FastCGI\Client::__construct(string $host, int $port = 0): Swoole\Coroutine\FastCGI\Client

Parameters

host

The host is where the FastCGI FPM server is monitoring, this could be an IP address like 127.0.0.1 or a UnixSocket like unix://tmp/php-fpm.sock.

port

The target server port number. No need to pass in the port when using a UnixSocket.

Return

Returns a new Swoole\Coroutine\FastCGI\Client object based on the host and port given


Description

Create a new FastCGI Client object, based on the given host and port of the target FPM server using the FastCGI protocol.


Last updated on August 31, 2022