swoole_client::__construct

����ԭ�ͣ�

swoole_client->__construct(int $sock_type, int $is_sync = SWOOLE_SOCK_SYNC, string $key);

����ʹ��swoole�ṩ�ĺ���ָ֮�����ͣ���ο� swoole��������

��php-fpm/apache�д��������ӣ�

$cli = new swoole_client(SWOOLE_TCP | SWOOLE_KEEP);

����SWOOLE_KEEP��־�󣬴�����TCP������PHP����������ߵ���$cli->closeʱ������رա���һ��ִ��connect����ʱ�Ḵ����һ�δ��������ӡ������ӱ���ķ�ʽĬ������ServerHost:ServerPortΪkey�ġ������ٵ�3��������ָ��key��

swoole_client��unsetʱ���Զ�����close�����ر�socket
�첽ģʽunsetʱ���Զ��ر�socket����epoll�¼���ѯ���Ƴ�
SWOOLE_KEEP������ģʽ��1.6.12����ã������ӵ�$key������1.7.5������

��swoole_server��ʹ��swoole_client