����ѡ��

Swoole\Client��Swoole\Http\Client����ʹ��set��������һЩѡ�����ijЩ���ԡ�

���������

$client->set(array(
    'open_eof_check' => true,
    'package_eof' => "\r\n\r\n",
    'package_max_length' => 1024 * 1024 * 2,
))

���ȼ��

$client->set(array(
    'open_length_check'     => 1,
    'package_length_type'   => 'N',
    'package_length_offset' => 0,       //��N���ֽ��ǰ����ȵ�ֵ
    'package_body_offset'   => 4,       //�ڼ����ֽڿ�ʼ���㳤��
    'package_max_length'    => 2000000,  //Э����󳤶�
));

Socket�������ߴ�

$client->set(array(
    'socket_buffer_size'     => 1024*1024*2, //2M������
));

����socket�ײ����ϵͳ��������Ӧ�ò���������ڴ滺������Ӧ�ò㷢�������ڴ滺����

�ر�Nagle�ϲ��㷨

$client->set(array(
    'open_tcp_nodelay'     =>  true,
));

SSL/TLS֤��

$client->set(array(
    'ssl_cert_file'     =>  $your_ssl_cert_file_path,
    'ssl_key_file'     =>  $your_ssl_key_file_path,
));

swoole-1.7.21����߰汾����

��IP�Ͷ˿�

$client->set(array(
    'bind_address'     =>  '192.168.1.100',
    'bind_port'     =>  36002,
));

swoole-1.8.5����߰汾����

Socks5��������

$client->set(array(
    'socks5_host'     =>  '192.168.1.100',
    'socks5_port'     =>  1080,
    'socks5_username' => 'username',
    'socks5_password' => 'password',
));

ʹ��˵��