public function __construct(SocketPool $sockPool = null, HttpTunneler $tunneler = null) { $this->sockPool = $sockPool ?: new SocketPool(); $this->tunneler = $tunneler ?: new HttpTunneler(); $this->autoDetectProxySettings(); }