<?php Swoole\Coroutine\Client::__construct ( $type )
The type of the client
Create a coroutine TCP/UDP client within a coroutine context, with or without SSL.
Compile Swoole with
with-openssl-dirto support SSL. Also add
SWOOLE_SSLto the constructor.
Establish a SSL connection.
<?php $client = new Swoole\Coroutine\Client(SWOOLE_SOCK_TCP | SWOOLE_SSL);
Create persistent TCP connection:
<?php $client = new Swoole\Coroutine\Client(SWOOLE_TCP | SWOOLE_KEEP);