php8.5
Home/ Manual/ swoole / client/ Swoole\Client::__construct

Swoole\Client::__construct

PHP function Edit on GitHub ✎

(PECL swoole >= 1.9.0)

Create Swoole sync or async TCP/UDP client, with or without SSL.

Description

Swoole\Client::__construct(int $sock_type, [int $is_async])

Parameters

sock_type

The type of socket: SWOOLE_TCP, SWOOLE_UDP, SWOOLE_ASYNC, SWOOLE_SSL, SWOOLE_KEEP.

is_async

Synchronous or asynchronous client.

Source: reference/swoole/swoole/client/construct.xml · from the official PHP manual (php/doc-en)