【发布时间】:2014-06-05 17:24:33
【问题描述】:
我需要设置CURLOPT_TCP_NODELAY CURL 选项,但问题是我不知道如何使用 Sf2 的服务容器。
下面是Guzzle 现在的注入方式:
services:
user.user_manager:
class: Foo\UserBundle\Model\UserManager
arguments:
- @guzzle.client
但我还需要添加CURLOPT_TCP_NODELAY。
简单的 PHP 示例:
$guzzle = new \Guzzle\Http\Client(null, array(
'curl.options' => array(
'CURLOPT_TCP_NODELAY' => 1
)));
【问题讨论】: