我需要设置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
)));